Skip to content

Instantly share code, notes, and snippets.

View PyrekP's full-sized avatar

Paweł Pyrek PyrekP

View GitHub Profile
@PyrekP
PyrekP / gist:c47b34108d42aa21ef04bd52af4fbdfe
Created April 4, 2018 13:52
git remove unwanted commit in the middle (local)
git init
echo commit 1 > readme.txt
git add readme.txt
git commit -m "first"
echo commit 2 > remove_me.txt
git add remove_me.txt
git commit -m "second"
echo commit 3 > some_file.txt
git add some_file.txt
git commit -m "third"