DEV Community

How To Use Git: A Reference Guide

Lisa Tagliaferri on January 07, 2019

Git Cheat Sheet Introduction Teams of developers and open-source software maintainers typically manage their projects through...
Collapse
 
cbillowes profile image
Clarice Bouwer

Thank you, this list is a gem.

I have a walkthrough if you are interested in using git interactive mode git add -i which I use when I want to break down my commits into semantic/atomic commits instead of committing all changes (usually a few small feature changes) in one go.

Collapse
 
sdmg15 profile image
Sonkeng Maldini

Thank for this,
I think it's also worth mentioning about git revert 1fc6665 which contrary to git reset --hard 1fc6665 will not remove completely the commit from the history but will create a new commit that reverses the specified commit and won't delete it from the history as git reset does, so that if later you realize that those changes were not so bad you can come back to them easily again 😄
NB: With git reset, you'll be oblige to git push -f (Forcing updating of the upstream)

Collapse
 
drylabrebel profile image
Geoff English

Great summary! Very helpful.

Collapse
 
morgboer profile image
Riaan Pietersen

Thanks for this, great list.

If you are like me and prefer things a bit more visual, then SmartGIT is a great little app to use: syntevo.com/smartgit/