Skip to content

Revert to commit and delete history Boîte de réception x #21782

Answered by Wabri
sigiaccio asked this question in New to GitHub
Discussion options

You must be logged in to vote

Ok, this is a little danger but i will try with an example.

1. This is the history of my master:

2. I want to delete the second commit with description “this commit need to be deleted”. The first thing to do is to get the commit ID of the previous commit, in my case the commit is “reset here”. You can get the commit id by the web UI:

Or with command line:

git log

with output:

commit 2e45e59114bbb7f6b36b8e8598415a96690190e4
Author: Gabriele Puliti <gabriele.puliti@gmail.com>
Date: Wed Jan 30 16:57:56 2019 +0100
i want this file on history

commit a18476877494ec36e30fa4edc0850bbf36f08100
Author: Gabriele…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants