![]() ![]() When you make a new commit, that creates the branch itself, and now the problem is resolved: you're on the branch, which identifies the one new commit just made, which is the current commit, so HEAD names both the current commit and the current branch. git/HEAD, without actually creating the branch itself in the reference database. The way Git handles this is to store the branch's name into. Git calls this an orphan branch or a branch yet to be created (depending on which part of Git is doing the calling). You're on a branch, namely master, that doesn't exist. There are no commits in this repository, so which commit is the current commit? Imagine you have just created a new, totally-empty repository. ![]() In point 1 above, the almost is there for a particular reason. The git symbolic-ref HEAD command answers only the first question git rev-parse HEAD mostly answers the second, but can be told to answer the first too / instead.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |