Skip to content

A collection of useful extra git scripts I've discovered or written, packaged for ease of use with shell frameworks.

License

Notifications You must be signed in to change notification settings

Jeff-Lewis/git-extra-commands

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-extra-commands

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.

Table of Contents generated with DocToc

Installing

Pre-requisites

The version of git Apple includes in OS X is stale. brew install git if you're on OS X.

Antigen

If you're using Antigen:

  1. Add antigen bundle unixorn/git-extra-commands to your .zshrc where you've listed your other plugins.
  2. 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.

oh-my-zsh

If you're using oh-my-zsh:

  1. In the command line, change to oh-my-zsh's custom plugin directory :

    cd ~/.oh-my-zsh/custom/plugins/

  2. Clone the repository into a new git-extra-commands directory:

    git clone https://github.com/unixorn/git-extra-commands.git git-extra-commands

  3. Edit your ~/.zshrc and add git-extra-commands – same as clone directory – to the list of plugins to enable:

    plugins=( ... git-extra-commands )

  4. Then, restart your terminal application to refresh context and use the plugin. Alternatively, you can source your current shell configuration:

    source ~/.zshrc

zgen

If you're using zgen:

  1. Add zgen load unixorn/git-extra-commands to your .zshrc along with your other zgen load commands.
  2. rm ${ZGEN_INIT}/init.zsh && zgen save

Manual Installation

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:

  1. git clone this repository
  2. Add it to your $PATH.

Other useful git stuff

  • 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:

  • 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

Credits

Contributing

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.

About

A collection of useful extra git scripts I've discovered or written, packaged for ease of use with shell frameworks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 48.1%
  • Ruby 18.8%
  • Perl 16.6%
  • Python 16.5%