Answer the question
In order to leave comments, you need to log in
How to merge the last 2 commits?
I pushed the changes to the server, after that I saw that I forgot to add something, made changes on the LAN and pushed it again. Now there are 2 separate commits on the server for one task. How to combine them into one?
Answer the question
In order to leave comments, you need to log in
git reset --soft HEAD~2
git commit -a -m 'join'
git push origin <branch> --force
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question