Git

git-logo 0

git-see the changes in a commit

To see the diff got com­mit­ted in par­tic­u­lar com­mit mes­sage use one of the fol­low­ing com­mands git show COMMIT OR git diff COMMIT^ COMMIT Fur­ther read­ing : git diff git show

git-logo 0

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…

git-logo 0

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-logo 0

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…

git-logo 0

What is a git bare repository and when to use it

A lot of times, I see ques­tions about the dif­fer­ence between an ordi­nary git repos­i­tory and a bare git repos­i­tory. So I decided to quickly made up pic­ture of the actual dif­fer­ence, you know the…