Git branch 结果不分页展示
配置 git branch 不以分页形式展示,默认情况下,查看分支会以分页形式展示,退出需要输入q,多一个步骤多一个麻烦,可以通过下面的配置关闭:
git config --global pager.branch false
开启之前的效果:

会进入分页模式,
开启之后的效果:

所有的分支都展示出来了。
More:https://stackoverflow.com/questions/48341920/git-branch-command-behaves-like-less
别名配置
打开全局的 .gitconfig 文件,加入 [alias] 区块,然后加上配置:
vim ~/.gitconfig
举个例子:
[mergetool "sourcetree"]cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"trustExitCode = truepath =[difftool "sourcetree"]cmd = opendiff \"$LOCAL\" \"$REMOTE\"path =[user]name = zhening.cznemail = zhening.czn@alibaba-inc.com[alias]co = checkoutbr = branchst = statuscob = checkout -bbrr = branch -ra = add .
或者修改 .zshrc 文件,在内部加入下面内容,再执行 source ~.zshrc :
alias -s ga='git add .'alias -s gpull='git pull'alias -s gpush='git push'alias -s gp='git push'alias -s gs='git status'
注意等号=两边不能有空格。
