Skip to content

Instantly share code, notes, and snippets.

@danidiaz
Forked from igal/gist:53855
Created July 14, 2017 20:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danidiaz/7c32a36612069d278d81c35d7c36472d to your computer and use it in GitHub Desktop.
Save danidiaz/7c32a36612069d278d81c35d7c36472d to your computer and use it in GitHub Desktop.
.gitrc aliases for common git commands
# Aliases for common git commands. E.g., enter "git d" for "git diff"
# These settings live in the ~/.gitconfig file.
[alias]
b = branch
ba = branch -a
ci = commit
co = checkout
d = diff
dc = diff --cached
fp = format-patch
g = !git gui &
gr = log --graph
go = log --graph --pretty=oneline --abbrev-commit
k = !gitk &
ka = !gitk --all &
lc = log ORIG_HEAD.. --stat --no-merges
lp = log --patch-with-stat
mnf = merge --no-ff
mnff = merge --no-ff
mt = mergetool
p = format-patch -1
serve = !git daemon --reuseaddr --verbose --base-path=. --export-all ./.git
sra = svn rebase --all
sh = !git-sh
st = status
stm = status --untracked=no
stfu = status --untracked=no
pullsrb = !git stash save && git pull --rebase && git stash pop && echo 'Success!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment