Git - How to Merge detached HEAD back to origin/master

# References
git help branch

# Use Cases
You made a checkout from remote repo
You create a new brach from a previous commit
    git  -b new-branch-name c2744f95d

# Solution
git checkout –b temp #makes a new branch from current detached HEAD
git branch –f master temp # -f --force Reset <branchname> to <startpoint> if <branchname> exists already
git branch –d temp # delete the <temp> branch
git push origin master #push the re-established history
Free Tags: