Answer the question
In order to leave comments, you need to log in
Confusion in git with commit history, how to undo two commits and merge?
Hello. Accidentally typed in the commit message, did not notice, sent to a remote repository (bitbucket). Due to inexperience, I tried to fix it with the amend command. Send to remote failed. Made a pull, after which it was possible to send. But it turned out the merging of branches (master and master?). After that I tried to do all sorts of resets and reverts. As a result, one commit has grown into three + one more in the local (not sent yet):
And in the local repository there is also one revert commit, but at least this can be solved with a simple "delete and re-upload everything". How to remove all this garbage from a remote repository? Don't leave it like that.
Answer the question
In order to leave comments, you need to log in
git reset + git push --force
Provided that no one else downloaded this garbage from the remote repository and did not push something there after you.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question