Posted By: Anonymous
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”.
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.
There’s no problem with
git in bash, it tells me what I’m doing.
should show all the local branches of your repo. The starred branch is your current branch.
If you want to retrieve only the name of the branch you are on, you can do:
git rev-parse --abbrev-ref HEAD
or with Git 2.22 and above:
git branch --show-current