Search code examples
gitgit-push

Making a Git push from a detached head


I am on a detached head and made some changes. I want to push up these changed to this detached head with Git. I do not want my changes to go onto the develop branch and certainly not on the master branch. I am working on a file with another individual.

Example branches

   develop
   master
   *(HEAD detached at origin/49792_testMocha)

How do I push into head without affecting develop or master?


Solution

  • Create a new branch using git checkout -b BRANCH_NAME

    Then push the new branch to remote: git push origin BRANCH_NAME