Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save encoderit-arman/1dcaad529948c76bbb702b7a2c5f1e62 to your computer and use it in GitHub Desktop.
Save encoderit-arman/1dcaad529948c76bbb702b7a2c5f1e62 to your computer and use it in GitHub Desktop.
If you’ve made some commits in the detached head then if you need those commits on your master. For that, all you need is to create a new branch and merge it to master and then delete the branch. For that you can do:
git branch temp
Now checkout to master
git checkout master
Merge the branch
git merge temp
This will update your master with the commit files or commits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment