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.
A branch in Git is simply a lightweight movable pointer to one of these commits. The default branch name in Git is master . As you start making commits, you're given a master branch that points to the last commit you made. Every time you commit, the master branch pointer moves forward automatically.
There are two ways to clone a specific branch. You can either: Clone the repository, fetch all branches, and checkout to a specific branch immediately. Clone the repository and fetch only a single branch.
To display the current branch you're on, without the other branches listed, you can do the following:
git rev-parse --abbrev-ref HEAD
Reference:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With