Last active
November 18, 2021 12:48
-
-
Save 0532/52ad62d1d0c80f0c0d273e9a110317e4 to your computer and use it in GitHub Desktop.
git 命令常用别名,配置在.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
[alias] | |
s = status | |
st = status | |
sb = status -s -b | |
############# | |
d = diff | |
di = diff | |
dc = diff --cached | |
dk = diff --check | |
dck = diff --cached --check | |
############# | |
c = commit | |
ca = commit -a | |
cm = commit -m | |
ci = commit | |
############# | |
l = log --oneline | |
lg = log --oneline --graph --decorate | |
############# | |
o = checkout | |
co = checkout | |
ob = checkout -b | |
cob = checkout -b | |
############# | |
b = branch | |
bv = branch -vv | |
ba = branch -a | |
bd = branch -d | |
br = branch -r | |
############# | |
f = fetch | |
fo = fetch origin | |
############# | |
m = merge | |
############# | |
ps = push | |
pl = pull | |
pb = pull --rebase | |
psf = push -f | |
psu = push -u | |
plu = pull -u | |
pso = push origin | |
plo = pull origin | |
pbo = pull --rebase origin | |
psfo = push -f origin | |
psuo = push -u origin | |
pluo = pull -u origin | |
############# | |
rb = rebase | |
############# | |
re = reset | |
rh = reset HEAD | |
reh = reset --hard | |
rem = reset --mixed | |
res = reset --soft | |
rehh = reset --hard HEAD | |
remh = reset --mixed HEAD | |
resh = reset --soft HEAD | |
############# | |
w = show | |
############# | |
human = name-rev --name-only --refs=refs/heads/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment