Git的常用配置

1.git config相关的配置文件:
(1).system(/etc/gitconfig),系统级别;
(2).global(~/.gitconfig),用户级别;
(3).local(.git/config),当前仓库级别,这个是git config的缺省级别 

2.git常用的一般设置
git config --global user.name "sanfeng.zhang"
git config --global user.email "[email protected]"
git config --global core.editor gedit 修改编辑器为gedit
git config --list 查询配置信息

3.常用别名:
git config --global alias.st "status" 将status起别名为st,也可以直接在~/.gitconfig中改
[alias]

co = checkout
br = branch
ci = commit
st = status
pl = pull
ps = push
sh = stash
df = diff
lg = log
co = checkout
cp = cherry-pick
ds = diff --staged
l = log
lg = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative
lp = log --pretty=oneline
sa = stash apply
sh = show
ss = stash save
amend = commit --amend
amendf = commit --amend --no-edit
 

你可能感兴趣的:(git,c++11,大数据,linux,git)