如何在Git中获取当前分支名称? [英] How to get the current branch name in Git?
本文介绍了如何在Git中获取当前分支名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我来自Subversion背景,当我有一个分支时,我知道我在做什么这些工作文件指向这个分支。
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".
但是对于Git,我不确定当我在NetBeans或Notepad ++中编辑文件时,无论它是绑定到master还是其他分支。
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 在bash中,它告诉我我在做什么。 git branch
应该显示你的仓库的所有本地分支。星号分支是您当前的分支。
git branch
should show all the local branches of your repo. The starred branch is your current branch.
这篇关于如何在Git中获取当前分支名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文