C
C
Comnox2021-08-06 16:07:44
git
Comnox, 2021-08-06 16:07:44

Is it possible to remove only two specific commits from a branch?

good afternoon, I ran into such a problem that I need to delete two old commits from the branch, but I don’t know how best to do this

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Zagaevsky, 2021-08-06
@zagayevskiy

no need to delete anything, there is git revert

V
Vasily Bannikov, 2021-08-06
@vabka

If you need to delete-delete, and not just revert changes, then only rewriting history using interactive rebase
See Deleting a commit
https://git-scm.com/book/en/v2/Git-Tools-Rewriting...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question