git的配置文件

cat ~/.gitconfig       #git 的配置

git help xx      #查看帮助文档

[alias]

st = status  --short --branch

# 增加commit

ci = commit -a -v -s 

# 合并改过的内容

cm = commit -a --amend -C HEAD

#在commit的基础上修改commit

ca  = commit --amend

# switch to branch

co = checkout -b

#only create a new brach

br= branch

bv = branch -vv

ba = branch -ra

#delete the branch

db = branch -d

df = diff

dc = diff --cached

lg = log -p     #git log lg ./  查看当前log的详细信息

lf = log --stat

last = log -1 HEAD   #查看最近的log

#以某种格式列出log

ll = log --pretty=format:"%C(yellow)"...

ld = log --pretty=format:"%C(yellow)%h\\"

ls = log....

lo = log --oneline

#删除log中的第一个commit

un = reset --hard  HEAD

uh = reset --hard HEAD^

aa = add --all

mm = merge --no-ff

pu = push --tags

pl = pull ---rebase

 

 

 

posted @ 2017-10-19 17:55  yieli  阅读(174)  评论(0编辑  收藏  举报