Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe you have don this for brevity, but git branch does not create a new commit.

"The command’s second form creates a new branch head named <branchname> which points to the current HEAD, or <start-point> if given."

So after a git branch command, the test branch still points to the same commit as HEAD.

You have to make an additional commit for them to diverge.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: