2
I ended up using this command improperly, and added many files that should not, wanted to return the previous state, command git reset HEAD <file>
returns only one file, and as there are many it is impossible to use it. I added the name of the directory to the file .gitignore
, but when the command was running git status
was listed all the files in the phase of being committed, I did not commit, because I believe commit and then do the push
, these files will be loaded (maybe it’s wrong). I saw in a link of the OS-pt that the command git reset HEAD *
would return all changes to the state untracked
, the files that went back to that state was exactly the file .gitignore
and not the files I had previously added. How do I go back?
Just try to
git reset
.– StatelessDev
Use
git reset .
with space and period after reset– OtavioCapel
Related: https://answall.com/q/325951/112052
– hkotsubo