Answer the question
In order to leave comments, you need to log in
What to do if I put extra files in one commit?
I made a commit, but added extra files there. How can I cancel it to split it into two?
Answer the question
In order to leave comments, you need to log in
git reset --soft HEAD^
Reverts the last commit.
Then
to exclude the file.
And then fixing as usual.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question