Answer the question
In order to leave comments, you need to log in
Git marked all files in the branch as changed - how to rollback?
Hi all.
I work in git with one file, but at some incomprehensible moment, all the files in the branch were marked as modified. though I haven't changed them. Is this a glitch? How to deal with it, how to turn everything back?
Answer the question
In order to leave comments, you need to log in
It is possible that there was some kind of glitch with Git in the folder of the problematic project, or the IDE, if it was worked with before the problem, changed / saved something in the files.
In any case, if you did not change the files, i.e. before the problem were with a committed commit, then you can simply revert all changed files to the state of the last commit: git checkout .
UPD: I didn't notice the stipulation that you were working with one file. In this case, with a command like git checkout file.cpp (where file.cpp are the files you haven't changed) you can return the state of the last commit to all changed files, without touching the one you were working on.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question