DEV Community

Git it? Got it? Good.

Aliya Lewis on December 01, 2019

Hey everyone! This will be a short and sweet blog on git commands. Let's git started (that was cringy for me too but I couldn't resist!). ...
Collapse
 
cescquintero profile image
Francisco Quintero πŸ‡¨πŸ‡΄

Did not know git diff --staged existed.

Gonna try it next time.

Collapse
 
aliyalewis profile image
Aliya Lewis

Glad I could help!

Collapse
 
yenyih profile image
Jordan Soo Yen Yih

"git fetch" and "git merge origin branch_name" are best practice every time before you commit your codes. (Don't mess with your teammates)πŸ˜‰

  • Tips: "git fetch --prune", "--prune" is the best utility for cleaning outdated branches.
Collapse
 
aliyalewis profile image
Aliya Lewis

Thanks! I didn't know about "git fetch --prune", I'll have to try that!

Collapse
 
qaispalekar profile image
Qais Palekar

Did not know git diff branch1 branch2 existed
will come in handy. Thanks!!

Collapse
 
aliyalewis profile image
Aliya Lewis

You're welcome!

Collapse
 
giongto35 profile image
giongto35

Good attempt writing on Git but I would suggest talking about "git add" and "git commit" over "git add", "git reset", "git remote" to suit beginners more.

Collapse
 
aliyalewis profile image
Aliya Lewis • Edited

I didn't attempt to write about git commands, I did write about git commands. Also, I intentionally left those out as I felt they were commonly searched/used. But if any beginners are looking for the commands you mentioned, they can find them by clicking on the link under "resources" at the end of my blog πŸ™‚