D
D
Dmitry2021-11-27 13:08:32
git
Dmitry, 2021-11-27 13:08:32

How do I remove the latest commit in git?

61a2032253319843689504.jpeg
How exactly do I remove a commit so that it disappears from the repository altogether?
now I am in it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
toxa82, 2021-11-27
@toxa82

Return to normal "git checkout master"
Delete the last (end) commit "git reset --hard HEAD~1"
Delete in the middle "git rebase -i" and then read the manuals on what to write there.
Well, respectively, after the manipulation of "git push -f"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question