Skip to content
More or less useful helpers for git
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Gem Version Build Status Dependency Status Code Climate Coverage Status

git_shizzle lets you quickly operate on the file lists printed by git status. Imagine a number before each line of the status output and use that index to specify the file you want to operate on. For example, to stage the first file in the list of "Changes not staged for commit", run quick-git stage 1.

  • Tested against Ruby 1.9.3, 2.0.0 and 2.1.0


$ gem install git_shizzle


$ quick-git help


# Stage modified file 1 (first in output of git status).
$ quick-git stage 1

# Stage modified file 1, 2, 3 and 4, as in output of git status.
$ quick-git stage 1 2 3 4

# Stage files 1 to 3. Used like a Ruby range.
$ quick-git stage 1..3

# Stage all modified files.
$ quick-git stage .

# Show diff of modified file 1.
$ quick-git diff 1

# Remove staged file 1 from the index.
$ quick-git unstage 1

# Add untracked file 1 to the index.
$ quick-git track 1

# Discard working copy changes of modified file 1.
$ quick-git checkout 1

git aliases

I recommend you set up git aliases like git config --global quick-git stage. See some examples in my dotfiles repository.


Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.


  1. Fork it (
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Something went wrong with that request. Please try again.