E
E
EYPPNM2019-04-25 11:26:42
git
EYPPNM, 2019-04-25 11:26:42

How to undo (remove) the last commit?

How to undo the last commit if it is pushed to the server?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2019-04-25
@zagayevskiy

In general, you can do without force push. Of course, this will not be a deletion, but it is safer to
git revert (it seems that git revert HEAD~1 should also work). And then just push.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question