Detached Head state on the Git remote repository

44 views Asked by At

When I clone an existing project, the project doesn't point to the tip of the branch, but to a commit, so the HEAD is detached. If I perform a "git checkout theMainBranch", that allows locally to work properly, but when I commit and push some changes, if I clone again the project, the Head still be pointed by the commit that I described first, but not by the last commit, that obliges to make a "git checkout the MainBranch" again after having cloning. Any ideas to avoid the have the Head detached on the git remote repository ? Thanks

0

There are 0 answers