DEV Community

Cover image for How to Get Better with Git
Ana Vela
Ana Vela

Posted on • Originally published at anavela.dev

How to Get Better with Git

Git is a version control tool that any developer would benefit from learning. Using git allows you to save your code as you make changes, and you can see what changes have been made over time. When working with other developers, knowing git makes it easy to collaborate on projects. This includes open-source and side projects as well as when you are working on a dev team.

Over the years, I've had practice using Git. I feel pretty good with the basics such as setting up new projects on GitHub, creating branches, resolving conflicts, and contributing to open source or other team projects. I tend to stick to the git commands most familiar to me without trying new concepts, so I'm ready to step things up.

What's your git level?

Knowing your git level of knowledge is the first step to improve your skills. Samuel Faure wrote How to Learn Git Slowly where he outlines six levels of knowledge. Refer to Samuel's guide as it can serve as a roadmap for your git level-up strategy.

Here are some ideas and free git resources to help you boost your git know-how:

E-Books

E-books can serve as resources you come back to whenever you want to review a concept or look something up.

Git Cheat Sheets

Keep git cheat sheets handy as you work. You might also want to create one of your own.

Git Courses

Dedicate some time to complete a git course and keep applying your knowledge through the course material or with your side projects. Check out these courses which vary in length depending on how you want to structure your learning.

Interactive Resources

One of the best ways to learn something is to practice it, so give these two resources a try.

  • With Git Immersion, you'll complete short challenges on your local computer as you learn basic git commands.

  • Learning Git Branching guides you through visuals as you use git commands and create branches.

Pair program with others

If you have a mentor or work with a team of developers, take some time to pair program. Not only will you improve your coding skills, you'll have a chance to see the other developer's techniques with git. To them, their methods might come naturally so they may not think what they are doing is anything special.

Watch developer live streams or tutorials

You typically watch a live coding session for the actual content, but there is also another layer of learning by noticing how the developer works with git and uses various commands and shortcuts.

Conclusion

When you understand git, you find this common ground among many kinds of developers who also use git. Taking the time to practice git and dive deeper into the various levels of knowledge will help you become a better developer and teammate. Being well-versed with git could help you stand out when applying for jobs and well as making you better prepared when being onboarded to a new company or team.

What's your git story? Are you new or a pro with git? Any helpful tips you can share?

Photo courtesy of Lagos Techie on Unsplash

Top comments (20)

Collapse
 
jonrandy profile image
Jon Randy ๐ŸŽ–๏ธ

It's 100% unnecessary to use Git on the command line. I'm a senior dev and much prefer a GUI client (I thoroughly recommend GitKraken)

Collapse
 
anaveecodes profile image
Ana Vela

I use GitKraken when I help maintain an open source project. With so many branches and pull requests, it helps me keep track of what is going on at any given time. And I love the visual aspect of it. What is your #1 piece of advice for those who are new to git?

Collapse
 
arroyoruy profile image
Dan Arroyo

This statement can be done the other way around too: It's 100% unnecessary to use Git in a GUI. I am a senior dev and rarely use Git outside of the command line. it is all preference.

Collapse
 
cvega profile image
Casey Vega

You don't need to use a CLI tool to take advantage of the value git brings, but if one is to download and install git, they are installing the git binary which IS a command line tool. At GitHub we tend to recommend the CLI, but if folks feel good using a different tool to interface with Git, they should stick with it.

I'm a little bias, but lab.github.com is also a good learning resource.

Collapse
 
anaveecodes profile image
Ana Vela

Good point, Dan!

Collapse
 
jonrandy profile image
Jon Randy ๐ŸŽ–๏ธ • Edited

Very true, but the article and others like it seem to imply that learning to use it on the command line is absolutely essential. It isn't

Thread Thread
 
arroyoruy profile image
Dan Arroyo

It depends on what you do. I find myself in many different environments frequently. I learned CLI because it would take too long, or I am not allowed to install preferred tools. CLI, just like vi, tends to be everywhere. if you always develop in the same machine, then OK, I agree.

Collapse
 
waylonwalker profile image
Waylon Walker

I really like that you included leaning on a mentor and watching closely to how others naturally use git.

There is no shortcut for practice. If you really want to level up your git skills without wrecking a real project practice. Make a new project, git init, add a file, edit it in different ways and commit all along. Try to branch, rebase and merge as well. When your done delete it and move in with better git skills.

Collapse
 
anaveecodes profile image
Ana Vela

That's a great idea to start a new project just to practice git. Concepts like merge conflicts will happen in real work scenarios, so I feel practicing how to resolve those in an environment without stress is time well spent!

Collapse
 
anitagraham profile image
Anita Graham

I find that faux projects don't offer the 'drive' to do enough things and its hard to make mistakes that matter!

You need to use git on a real project to develop the habits of git (make a new branch every time you are tackling a new issue, for instance).

Collapse
 
jwhenry3 profile image
Justin Henry

Alternate title: How to Git Better

Collapse
 
anaveecodes profile image
Ana Vela

Love that title!

Collapse
 
efrenshou profile image
Efrรฉn Vรกzquez Solรญs

Now there's no excuse to not level up our git knowledge with all the resources you've listed here. Already bookmarked. Thank you, Ana!

Collapse
 
anaveecodes profile image
Ana Vela

I'm so glad this post can be useful to you, Efrรฉn!

Collapse
 
bobbyiliev profile image
Bobby Iliev

Great article!

Thank you for the mention ๐Ÿ™Œ

Collapse
 
anaveecodes profile image
Ana Vela

Sure! I'm always happy to share great resources. :)

Collapse
 
mike4040 profile image
Mike Kravtsov

Iโ€™ll add git course at codewithmosh.com

Collapse
 
anaveecodes profile image
Ana Vela

That's a great idea, Mike! I've checked out some of Mosh's tutorials and he's a good instructor. Best wishes to you :)

Collapse
 
lofibytes profile image
Jillian S. Estrella (she/her)

Donโ€™t leave out Oh Shit, Git!?!

ohshitgit.com/

Itโ€™s a great resource.

Collapse
 
anaveecodes profile image
Ana Vela

lol Good one!