Skip to content

Instantly share code, notes, and snippets.

@cowboy
Created January 23, 2010 22:40
Show Gist options
  • Save cowboy/284837 to your computer and use it in GitHub Desktop.
Save cowboy/284837 to your computer and use it in GitHub Desktop.
Some git-related bash stuff
## also see http://github.com/cowboy/bash-misc/blob/master/bash_prompt.sh
# ssh
ps aux | grep ssh-agent | grep -v grep > /dev/null 2>&1 || eval $(ssh-agent)
alias ssh_key='ssh-add -l | grep id_rsa > /dev/null 2>&1 || ssh-add'
# git
alias gst='git status'
alias gl='ssh_key && git pull'
alias gp='ssh_key && git push'
alias gd='git diff --color'
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gb='git branch'
alias gba='git branch -a'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment