如何在Git中获取当前的分支名称?

◇◆丶佛笑我妖孽 提交于 2020-08-14 12:03:18

问题:

I'm from a Subversion background and, when I had a branch, I knew what I was working on with "These working files point to this branch". 我来自Subversion的背景,当我有一个分支时,我知道我正在使用“这些工作文件指向此分支”的内容。

But with Git I'm not sure when I am editing a file in NetBeans or Notepad++, whether it's tied to the master or another branch. 但是使用Git时,我不确定在NetBeans或Notepad ++中编辑文件时,是将文件绑定到主文件还是其他分支。

There's no problem with git in bash, it tells me what I'm doing. bash中的git没问题,它告诉我我在做什么。


解决方案:

参考一: https://stackoom.com/question/QCl0/如何在Git中获取当前的分支名称
参考二: https://oldbug.net/q/QCl0/How-to-get-the-current-branch-name-in-Git
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!