A
A
Artem Kislenko2016-07-06 13:26:33
git
Artem Kislenko, 2016-07-06 13:26:33

How to remove a commit from the server?

Hello!
The question is this:
I accidentally committed to another branch, the commit was displayed on the server.
The customer asks to remove this commit so that it is not visible at all, i.e. not to undo the changes with another commit, but to remove it.
Is it possible to do this in git?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Tiunov, 2016-07-06
@webwork

If this is the last commit in the branch, then:
Delete it locally
Do a force push to the server
git push -f

A
Artem Parfenov, 2016-07-06
@getmanartem

tin, what kind of customer do you have? Does he need a product or beautiful git branches?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question