Skip to content

Instantly share code, notes, and snippets.

@expectedbehavior
Created July 26, 2010 21:51
Show Gist options
  • Save expectedbehavior/491316 to your computer and use it in GitHub Desktop.
Save expectedbehavior/491316 to your computer and use it in GitHub Desktop.
git-completion
--------------
http://benmabey.com/2008/05/07/git-bash-completion-git-aliases.html
.gitconfig
----------
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
lgp = log -p
lg = log --graph --pretty=format:'%C(bold red)%h%Creset -%C(yellow)%d%Creset %s %C(yellow)-%Creset %C(bold blue)%an%Creset %C(bold green)(%cr)%Creset'
unadd = reset HEAD
.bashrc
-------
alias g='git'
alias ga="git add"
complete -o default -o nospace -F _git_add ga
alias gd="git df"
complete -o default -o nospace -F _git_diff gd
alias gbr="git br"
complete -o default -o nospace -F _git_branch gbr
alias gl='git log'
complete -o default -o nospace -F _git_log gl
alias glg='git lg'
complete -o default -o nospace -F _git_log glg
alias gc='git commit'
alias gcm='git commit -m'
alias gca='git commit -a'
alias gcam='git commit -a -m'
alias gst='git st'
alias gco="git co"
complete -o default -o nospace -F _git_checkout gco
alias gpul="git pull"
complete -o default -o nospace -F _git_pull gpull
alias gpsh="git push"
complete -o default -o nospace -F _git_push gpush
User-contributed
----------------
Miles
'g{' = git stash
'g}' = git stash apply
'g{p}' = git stash && git pull --rebase && git stash apply
Eli
alias gi='git init; printf ".DS_Store\nThumbs.db\n" >> .gitignore'
alias gp='git pull --rebase || (notify "pull failed" "Git" && false)'
alias gpp='gp && git push origin `current_git_branch`'
alias gprp='gp && rake && gpp'
alias gri='git rebase -i origin/master^'
alias grc='git rebase --continue'
Google
[alias]
who = shortlog -s --
More
----
http://github.com/jqr/dotfiles/blob/master/bash_profile.d/git.sh
https://git.wiki.kernel.org/index.php/Aliases#Spelunking_of_the_project.27s_history
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment