我的git 偏好设置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
cat "source /usr/share/git/completion/git-completion.bash" >> ~/.bashrc
git config --global user.name "荒野无灯"
git config --global user.email "我的邮箱"
git config --global color.ui true
git config --global core.editor "vim"

git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.br branch
git config --global alias.unstage 'reset HEAD --'
git config --global alias.last 'log -1 HEAD'
cd ~
git clone git://github.com/github/gitignore.git gitignore
cd gitignore/Global
cat Archives.gitignore >> ~/.global_ignore
cat vim.gitignore >> ~/.global_ignore
cat SublimeText.gitignore >> ~/.global_ignore
cat SVN.gitignore >> ~/.global_ignore
cat Tags.gitignore >> ~/.global_ignore
cat "tags.list" >> ~/.global_ignore
cat Linux.gitignore >> ~/.global_ignore
git config --global core.excludesfile ~/.global_ignore

配置保存位置在 ~/.gitconfig,你也可以直接修改这个文件来修改全局配置

更多
2 Responses Post a comment
  1. xuzizzz

    学习了,不过你的站真是比较难打开~跟小张说以下吧

Leave a Reply

Note: You may use basic HTML in your comments. Your email address will not be published.

Subscribe to this comment feed via RSS