配置的命令比如:
$ git config --global user.name "Zhang San" $ git config --global user.email "[email protected]" $ git config --global alias.ci commit
配置KDiff3作为merge tool和diff tool
1.
下载KDiff3 ( http://sourceforge.net/projects/kdiff3/)并且安装.
2.
$ git config --global merge.tool kdiff3 $ git config --global meregtool.kdiff3.path "C:/Program Files (x86)/KDiff3/kdiff3.exe"
3.
然后启动gitk GUI界面
$ gitk
在Edit->Preferences->External diff tool输入"C:/Program Files (x86)/KDiff3/kdiff3.exe"
下面我的.gitconfig文件, backup一下
[alias] ci = commit co = checkout st = status br = branch oneline = log --pretty=oneline --since='2 days ago' onelog = log -p -1 [user] name = Zhang San email = [email protected] [color] diff = auto status = auto branch = auto ui = auto [merge] tool = kdiff3 [mergetool "kdiff3"] path = C:/Program Files (x86)/KDiff3/kdiff3.exe