Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

The solution of HEAD detached from XXXX

Shulou Source: shulou.com Published: 2022-06-02 02:03:41 10月01日 Update

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!

Tags: Branches methods content more problems updates helpless to this end warehouses practices reasons names this skills articles experience industry information information channels channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Information vpn Shulou Technology Shulou Tech Info