Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

When is the branch name updated?

I’m reading John Wiegley’s Git from the bottom up. In Introduction
he mentioned:

If you checkout a branch, HEAD symbolically refers to that branch,
indicating that the branch name should be updated after the next commit operation.

I’m confused here: for example master is a (special) branch name, it’s always master isn’t it? When will it be changed after a commit?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

By the context, it means that the commit referenced by the branch will be changed from the current to the next created commit. The current commit is the parent (or one of the parents) of the newly created one. It’s not the branch name itself that will be changed.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading