Skip to content

Instantly share code, notes, and snippets.

@mjgil-gist
Forked from mjgil/Git Aliases
Last active January 23, 2019 01:30
Show Gist options
  • Save mjgil-gist/5751893 to your computer and use it in GitHub Desktop.
Save mjgil-gist/5751893 to your computer and use it in GitHub Desktop.
Git: Aliases
Taken from TJ Holowaychuk: http://tjholowaychuk.com/post/26904939933/git-extras-introduction-screencast
Added to ~/.bash_aliases
alias gd="git diff | subl"
alias ga="git add"
alias gaa="git add --all"
alias gbd="git branch -D"
alias gst="git status"
alias gca="git commit -a -m"
alias gm="git merge --no-ff"
alias gpt="git push --tags"
alias gp="git push"
alias grh="git reset --hard"
alias gb="git branch"
alias gcob="git checkout -b"
alias gco="git checkout"
alias gba="git branch -a"
alias gchp="git cherry-pick"
alias gl="git log --pretty='format:%Cgreen%h%Creset %an - %s' --graph"
alias gpom="git pull origin master"
alias gcd='cd "`git rev-parse --show-toplevel`"'
alias gc='git add --all && git commit -m'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment