DEV Community

Discussion on: I'm a Git Master, Ask Me Anything

Collapse
 
mtjohnson01 profile image
Matt Johnson • Edited

What's the most common mistake people make when using git?

What's one thing everyone should make use of with regard to git, but (almost) no one does?

Collapse
 
gonedark profile image
Jason McCreary

Often when things go wrong, we resort to deleting our local copy and recloning the repo. This is going to happen in the beginning, especially when we just need to get something done.

I think this is a mistake. That is you need to learn what went wrong. If nothing else, look at your command history and try to replay them to recreate the issue and determine what went wrong. Bottom line - don't deprive yourself the learning opportunity.

I don't think many people respect the git add process. Many just add everything. As a developer, I like the opportunity to give my work a final review before I share it with my peers. So don't rush, use git add -p.