The original code is lost when git switches branches.

my newly modified code git add. Commit, detached head xxxxx, and then I git pull the code

push failed, so I switched to another branch and then switched back to the modified code.

ask the great god how to find it again

Apr.22,2021

as long as you have git commit, there should be, check out in the local version library.
if it is webstorm, there is another way. Right-click the project-git-show history and you can see it. You can restore it manually here. Webstorm comes with the function of automatic git.

Menu