详细见 https://stackoverflow.com/questions/6245570/how-to-get-the-current-branch-name-in-git
git rev-parse --abbrev-ref HEAD
该命令在 git2.7 版本中不起作用
git branch --show-current
详细见 https://stackoverflow.com/questions/6245570/how-to-get-the-current-branch-name-in-git
git rev-parse --abbrev-ref HEAD
该命令在 git2.7 版本中不起作用
git branch --show-current