Created
August 18, 2019 07:13
-
-
Save ashgkwd/841ebb4e604bd09cab35f906b422beee to your computer and use it in GitHub Desktop.
Some handy commands for Git users. Put it in your ~/.gitconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[core] | |
editor = vi | |
[alias] | |
spull = !git-svn fetch && git-svn rebase | |
spush = !git-svn dcommit | |
send = !git spull && git spush | |
up = pull --rebase | |
on = push origin master | |
co = checkout | |
ci = commit | |
ca = commit -a | |
br = branch | |
s = status | |
st = status | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
grc = rebase --continue | |
fixlast = commit --amend -C HEAD | |
undo = reset --hard | |
changes=diff --name-status -r | |
diffstat=diff --stat -r | |
serve = daemon --reuseaddr --verbose --base-path=. --export-all ./.git | |
whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author=\"$1\"' -" | |
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short | |
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; vim `f`" | |
add-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`" | |
vee = log --decorate --cherry-mark --oneline --graph --boundary |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment