If $GIT_DIR/ exists, that is what you mean (this is usually useful only for HEAD, FETCH_HEAD, ORIG_HEAD, MERGE_HEAD and CHERRY_PICK_HEAD) When ambiguous, a is disambiguated by taking the first match in the following rules: If you happen to have both heads/master and tags/master, you can explicitly say heads/master to tell Git which one you mean. master typically means the commit object referenced by refs/heads/master. ![]() ![]() master, heads/master, refs/heads/masterĪ symbolic ref name. If you consult the gitrevisions documentation, you will see a sequenced list of possibilities for resolving a symbolic reference name: Instead, there is a tag that is very poorly named, and in your clone, you have checked out that tag, resulting in the detached HEAD. So I did: $ git checkout -b PATCH_branch origin/PATCH_branchįatal: Cannot update paths and switch to branch 'PATCH_branch' at the same time.ĭid you intend to checkout 'origin/PATCH_branch' which can not be resolved as commit?Ĭould someone please explain what the last bit means? Or why I can't checkout a branch without being detached? I know under certain circumstances I might end up with a detached HEAD, but this isn't one of them. I figured perhaps I can create a local branch and make it track the remote. If you want to create a new branch to retain commits you create, you mayĭo so (now or later) by using -b with the checkout command again. ![]() State without impacting any branches by performing another checkout. You can look around, make experimentalĬhanges and commit them, and you can discard any commits you make in this The branch is checked out in detached head mode! I don't understand why it should do that. I just cloned a repo and tried to checkout a branch.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |