Answer the question
In order to leave comments, you need to log in
How to undo a commit but keep all changes?
It is necessary to return so that all the current changes would be visible to me in the GIT GUI, that is, before I pressed Commit. Just make one more edit and then I want to press Commit. Often this is needed.
In other words, the changes in the files, even if they are such, do not need to return to the state of the previous commit. But whatever GIT thinks it's already a commit. Something like this...
Answer the question
In order to leave comments, you need to log in
this will undo the last commit but leave the changes
and this will update the current commit with the updated data.
it is very important NOT to do these manipulations if the commit to be undone has already been uploaded to the server and downloaded by colleagues.
If I understand the question correctly, then you need git commit --amend
more details: https://habrahabr.ru/company/mailru/blog/267595/#8
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question