Table of Contents generated with DocToc
A zsh plugin that packages some extra git helper scripts I've found. I only wrote a few of these scripts, and the ones I didn't each have whatever licensing is included in the file.
This collection doesn't actually require zsh, but packaging as a ZSH plugin makes it more convenient for people using a ZSH framework to use this collection.
If you wrote one of these scripts and want it removed from this repository, please either make a PR or file an issue against the repo and I will remove it.
Some of these scripts use dash. brew install dash
if you're on OS X.
If you're using Antigen:
- Add
antigen bundle unixorn/git-extra-commands
to your.zshrc
where you've listed your other plugins. - Close and reopen your Terminal/iTerm window to refresh context and use the plugin. Alternatively, you can run
antigen bundle unixorn/git-extra-commands
in a running shell to have antigen load the new plugin.
If you're using oh-my-zsh:
-
In the command line, change to oh-my-zsh's custom plugin directory :
cd ~/.oh-my-zsh/custom/plugins/
-
Clone the repository into a new
git-extra-commands
directory:git clone https://github.com/unixorn/git-extra-commands.git git-extra-commands
-
Edit your
~/.zshrc
and addgit-extra-commands
– same as clone directory – to the list of plugins to enable:plugins=( ... git-extra-commands )
-
Then, restart your terminal application to refresh context and use the plugin. Alternatively, you can source your current shell configuration:
source ~/.zshrc
If you're using zgen:
- Add
zgen load unixorn/git-extra-commands
to your.zshrc
along with your otherzgen load
commands. rm ${ZGEN_INIT}/init.zsh && zgen save
Nothing here actually requires you to use ZSH or zgen, that's just a convenient distribution method for anyone using a ZSH framework.
If you aren't using any zsh frameworks, or if you're a bash user, do the following steps:
- git clone this repository
- Add it to your
$PATH
.
-
Scott Chacon's Pro Git book is a great resource for getting more out of git.
-
Peter Hurford's git-it-on.zsh plugin. It adds a gitit command that will open your current directory on github, in your current branch.
-
Peter also wrote git-aliases.zsh, which you may prefer to the git plugin from oh-my-zsh.
-
git-up - Fetch and rebase all locally-tracked remote branches
-
Zach Dennis has a great blog post - it's worth reading on it's own, but here are a couple of good sites I found through it:
- gitready.com/ is another great reference which has been collecting information and tips for git since 2009.
- gitimmersion.com/
-
gitsh - An interactive shell for git. From within gitsh you can issue any git command, even using your local aliases and configuration.
-
Kate Hudson maintains the git flight rules collection of useful git usage tips.
-
awesome-github - Faraz Fallahi maintains a curated list of Github & Git resources.
-
git_history_visualizer - python script to visualize the history of files in a git repository
-
git-fastclone - Think
git clone --recursive
on steroids. If you're doing repeated checkouts of a given repo on a machine (like a ci box), git-fastclone will speed things up considerably. -
There’s a quick introduction to git on learnxinyminutes.com
- git-big-file - Mislav Marohnić's dotfiles
- git-change-author - Michael Demmer in jut-io/git-scripts
- git-changes - Michael Markert's dotfiles
- git-churn - Gary Bernhardt's dotfiles
- git-copy-branch-name - Zach Holman's dotfiles
- git-credit - Zach Holman's dotfiles
- git-cut-branch - Ryan Tomayko's dotfiles
- git-delete-local-merged - https://plus.google.com/115587336092124934674/posts/dXsagsvLakJ
- git-divergence - Gary Bernhardt's dotfiles
- git-find-dirty - Matthew McCullough's scripts repository
- git-flush - John Wiegley's git-scripts
- git-grab - Ryan Tomayko's dotfiles
- git-improved-merge - Mislav Marohnić's dotfiles
- git-incoming - Michael Markert's dotfiles
- git-incoming-commits - Ryan Tomayko's dotfiles
- git-ls-object-refs - Ryan Tomayko's dotfiles
- git-maxpack - John Wiegley's git-scripts
- git-nuke - Zach Holman's dotfiles
- git-object-deflate - Ryan Tomayko's dotfiles
- git-outgoing - Michael Markert's dotfiles
- git-pie-ify - JeeBak Kim's gist
- git-promote - Trevor's Improving My git Workflow blog post
- git-prune-branches - Michael Demmer in jut-io/git-scripts
- git-publish - Michael Markert's dotfiles
- git-purge-from-history - David Underhill’s blog
- git-pylint - Runs pylint on any .py files modified or added in the git status
- git-rank-contributors - William Morgan [email protected]
- git-rebase-authors - Mislav Marohnić's dotfiles
- git-rel - Ryan Tomayko's dotfiles
- git-run-command-on-revisions - Gary Bernhardt's dotfiles
- git-shamend - Danielle Sucher's git-shamend blog post
- git-show-overwritten - Mislav Marohnić's dotfiles
- git-submodule-rm - Greg V's dotfiles
- git-thanks - Mislav Marohnić's dotfiles
- git-track - Zach Holman's dotfiles
- git-trail - Daniel Hahler's dotfiles
- git-undo-push -
- git-unpushed - Zach Holman's dotfiles
- git-unreleased - Mislav Marohnić's dotfiles
- git-up - Ryan Tomayko's dotfiles
- git-upstream-sync - One of my personal scripts
- git-when-merged - Michael Haggerty git-when-merged
- git-where - Mislav Marohnić's dotfiles
- git-winner - Garry Dolley https://github.com/up_the_irons/git-winner
- git-wtf - William Morgan
- github-open - Ryan Tomayko's dotfiles
Please include an entry in the credits section of README.md for any scripts in your PRs so authors get their work credited correctly. Please use #!/usr/bin/env interpreter
instead of a direct path to the interpreter, this makes it easier for people to use more recent versions when the ones packaged with their OS (OS X, I'm looking at you) are stale.