DEV Community

Cover image for 20 Git Commands you (probably) didn't know about 🧙‍♂️

20 Git Commands you (probably) didn't know about 🧙‍♂️

Alicia Sykes on December 18, 2022

If you've ever browsed the git manual (or run man git), then you'll have noticed there's a whole lot more to git than what most of us use on a dail...
Collapse
 
gbhorwood profile image
grant horwood

this is the first article that has made me upset the 'unicorn' button was removed. excellent stuff.

i would also encourage people to be aggressive with git diff. running that before commits can save... embarrassment.

Collapse
 
delta456 profile image
Swastik Baranwal

Thanks for writing this insightful and detailed article on Git.

Collapse
 
raibtoffoletto profile image
Raí B. Toffoletto

I've been running git daily for the past 4 years and I didn't know about the gui ans instaweb... 🙄 Thanks For The tip!!!!! Great article 🎉

Collapse
 
parmcoder profile image
Possawat Sanorkam

This post is so informative. Thank you very much.

Collapse
 
kissu profile image
Konstantin BIFERT • Edited

Not all of those work on my side even tho I pulled the latest git version (2.35.1), not sure where the issue may come from.

reflog is indeed quite powerful and saved me several time!

I need to also try to remember how you can recover some files if you didn't commit them. Got an idea? (example use-case: git reset --hard by accident before a commit)

Collapse
 
waterproofwebwizard profile image
Dennis Hüttner

It is always good to know more about Git and learn new commands that can improve working with the versioning system. The article gives a good overview of 20 lesser-known Git commands that can be useful for web developers, such as git bisect for debugging bugs, git grep for searching information or git submodules for importing from other repositories. I will certainly take a closer look at some of these commands and try them out in my workflow.

Collapse
 
frederickprice profile image
Frederick Price

You are pretty cool! Thank you for such info

Collapse
 
pterpmnta profile image
Pedro Pimienta M.

great post

Collapse
 
namangarg profile image
Naman Garg

Nice explanation

Collapse
 
carnotweat profile image
s

I knew most of them but yes +1 for git insta
i didn't know

Collapse
 
andradesampaio profile image
Andrade Sampaio

Congratulations post

Collapse
 
morokhovskyi profile image
Morokhovskyi Roman

Nice article ) most of the commads you listed I haven’t used yet, although I've been working for ~6 years as a dev

Collapse
 
sbouwnsv profile image
Sukhman

Thank u for sharing

Collapse
 
hcardamone profile image
hcardamone

Thanks for writing

Collapse
 
ryco_marketing profile image
RYCO MARKETING

Many thanks Alicia. Always great to produce a resource for others to use and learn from.

Collapse
 
itsdevelopmentcore profile image
ITSDevelopmentCore

Yooo, great article, i thinked that i know a lot after reading of "PRO Git" gigabook, but this is great reminder for usefull stuff. Saved in my chrome for now =)