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
I recommend you set up git aliases like
git config --global alias.qa 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.
- Fork it (http://github.com/agross/git_shizzle/fork)
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request