I have a folder, which I use “git init”, then, I use “git add .” to add all the files in to git. After that, I use a “git commit -m “initial setup” “. Now, I doing something, that I did wrong, I want to back to the status to “git commit -m “initial setup”, what can I do? thank you.
I may explain it in this way….
My Files: ABC
---> git add .
My Files: ABC
---> git commit -m "initial setup"
My Files: CDE
--->
I want to roll back to “My Files: ABC”
As I understand it: you started out with the folder, which had files A,B,C in it. In this folder you ran the commands
Then you made changes to files A,B,C, and now you want to undo those changes? In that case, just run
or I think this works too:
and it will undo any uncommitted changes you’ve made to the files
gitis tracking.