The solution of HEAD detached from XXXX
HEAD detached from XXXX solution, I believe that many inexperienced people are helpless about this, this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
This is done as follows
git reflog Find the commit that needs to be restored and write down the previous commit id.
git branch temp xxxx Create a new branch named temp, replace the previous temporary branch with this branch and have the commit to restore, xxxx is the commit id to restore
git push origin temp pushed to repository
git checkout master Switch to main branch
git merge temp Merge temp to master
Check if it is updated, if so git branch -d temp Delete this branch
After reading the above content, do you have the solution of HEAD detached from XXXX? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!