A community collection of Git plugins. Browse the scripts to see what's included.
A number of the plugins included in this project make the updating/branching/submitting process easier. As an example use case, if you are doing something like the GitHub Flow, your workflow for a feature might look something like this:
git fetch origin
git checkout -b feature-branch --no-track origin/master
# make some changes, add some files
git add -A
git commit -m "fixed stuff"
git push -u origin feature-branch
# open your repository on github.com, and click the button to make a new pull request
That is so much typing! Using these plugins, this can all be simplified to:
git f feature-branch
# make some changes, add some files
git ca -m "fixed stuff"
git pr
So much easier! ⚡
git clone git@github.com:afeld/git-plugins.git
Then add the following to your ~/.bash_profile
(or ~/.zshrc
, or whatever profile file you use):
export PATH=path/to/git-plugins/bin:$PATH
The plugin names intentionally favor descriptiveness over terseness, but you should make shortcuts for yourself that make sense for you. You can see some examples in the [alias]
section of afeld/dotfiles. To add a new shortcut:
git config --global alias.SHORT LONG
# you can then use
git SHORT
e.g.
git config --global alias.lg pretty-log
# enables
git lg
To use the workflow described above, run the following to set up the aliases:
git config --global alias.ca commit-all
git config --global alias.f create-feature-branch
git config --global alias.pr create-pull-request