Category: Uncategorized


Revert many commits in git

Log­i­cally speak­ing, the sim­plest way to revert sev­eral com­mits in git with­out los­ing com­mit his­tory is by cre­at­ing a new com­mit that rep­re­sents the revert. Note that its NOT a good prac­tice to revert…


Squash multiple commits into one

Pre­ma­ture com­mits hap­pen all the time. And often you want to squash all those pre­ma­ture com­mit into one mean­ing­ful com­mit  to keep your com­mit his­tory clean, eas­ily read­able and more mean­ing­ful. It’s quite easy to…


Git amend previous commit

Rewrit­ing com­mit his­tory with git Pre­ma­ture com­mits hap­pen by acci­dent more often than not. Some­times you just missed adding a file or maybe you real­ized that you should have added a much more descrip­tive commit…