idea to restore git to the version before the update

idea to restore git to the version before the update


I updated the code today and found that the files that were not submitted to the local library could not be found, and some codes developed in the past two days were also overwritten. Write an article to record the process of restoring git
to the historical version

1. Open history

open git history
2. You can see the updated code from the server

updated version
3. The git history of idea is very detailed, and every operation will be recorded, and it can be restored no matter whether you upload it to the local library or not.
We can choose the version that needs to be restored according to the time.
Select the version that needs to be restored according to the time, and click the return button to restore
ps, idea can also restore the files we are currently operating to the server code (blue turns black)
applicable to our files. If there is an error,
blue to black effect
git-->rollback can be restored to the state just updated
don’t try this function lightly when you want to do it again , if you make a mistake and accidentally click, don't panic, the first half of the article can be restored.

end of chapter

Guess you like

Origin blog.csdn.net/qq_41648113/article/details/106468366