Answer the question
In order to leave comments, you need to log in
How to rollback file changes with Git?
I finished the main page on the site, after which I wrote the standard code for the commit. I started to type the next page of the site, for example, shop.html. I created different files, and after 20 minutes I realized that I had done some kind of goo and I want to return to the last commit. I enter, for example: git checkout 542s4de
- commit log for an example. And gives me:
error: Your local changes to the following files would be overwritten by checkout:
index.html
Please commit your changes or stash them before you switch branches.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question