Last active
April 2, 2020 04:52
-
-
Save feifanzhou/65a5c1a90b0390327a99d6cd36e25ada to your computer and use it in GitHub Desktop.
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
[user] | |
name = "Feifan Zhou" | |
email = "[email protected]" | |
# http://haacked.com/archive/2014/07/28/github-flow-aliases/ | |
# https://gist.github.com/mwhite/6887990 | |
# https://stackoverflow.com/a/5188364/472768 | |
[alias] | |
branches = branch --sort=-committerdate | |
count = count-objects -vH | |
co = checkout | |
col = checkout @{-1} | |
com = checkout master | |
comx = checkout master | |
newbr = checkout -b | |
newb = checkout -b | |
pom = push origin master | |
plom = pull origin master | |
lom = pull origin master | |
cm = commit -m | |
amend = commit -a --amend | |
s = status -s | |
# l = log --graph --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short | |
l = log --graph --oneline --abbrev-commit --decorate --all | |
d = diff | |
da = diff --cached | |
ac = !git add . && git commit -am | |
ca = !git add . && git commit -am | |
bbx = !git checkout master && git pull --rebase origin master && git branch --delete @{-1} | |
uncommit = reset HEAD^ | |
sd = stash show -p | |
stashdiff = stash show -p | |
sl = stash list | |
stashlist = stash list | |
um = pull --rebase origin master | |
reset-all = !git reset --hard HEAD && git clean -df | |
co-pr = "!f() { \ | |
git fetch origin refs/pull/${1}/head \ | |
&& git checkout FETCH_HEAD \ | |
&& git log origin/master...HEAD --cherry --pretty=oneline \ | |
&& git diff --name-status origin/master... \ | |
;}; f" | |
ufm = !git checkout master && git pull && git col && git rebase master | |
rfm = !git checkout master && git pull && git col && git rebase master | |
[push] | |
default = current | |
# http://stackoverflow.com/questions/18257622/why-is-git-core-preloadindex-default-value-false | |
[core] | |
preloadindex = true | |
[diff] | |
colorMoved = yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment