kabaka / git-extra-commands

Some useful extra git scripts I've discovered, packaged for antigen/prezto/zgen/etc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table of Contents generated with DocToc

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 anyone 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.

Installing

Pre-requisites

Some of these scripts use dash. brew install dash 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

Without using any frameworks, or if you're a bash user

git clone this repository, then add it to your $PATH. Nothing here actually requires you to use ZSH or zgen, that's just a convenient distribution method for anyone using a ZSH framework.

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.

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

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.

About

Some useful extra git scripts I've discovered, packaged for antigen/prezto/zgen/etc

License:Apache License 2.0


Languages

Language:Shell 49.9%Language:Ruby 26.7%Language:Python 23.5%