前言:有时候在执行git命令比较多的情况下,每次敲git命令比较费时,同时有些命令比如cherry-pick这种比较长时更是费时,所以可以通过设置命令行简写来设置。
修改方法:
- windows下:
- Git\etc\gitconfig,编辑如下:(最后边追加)
-
[alias] a = add bc = branch cm = commit co = checkout pl = pull me = merge mnf = merge --no-ff ps = push st = status gdf = gitdiff l = log cp = cherry-pick ca = commit -a b = branch
-
- Git\etc\gitconfig,编辑如下:(最后边追加)
- linux:
任意路径下输入:vim ~/.gitconfig,在后边追加如下内容