DEV Community


The fact that I barely know how to use git has been biting me in the butt a lot lately 😭

ben profile image Ben Halpern ・1 min read

Easily the weakest part of my dev game is git, which is probably the most universally important tool to know.

I've been painting myself into frustrating git corners lately and I think I need to expand the number of commands I truly understand.

Thank you for listing ❀️

Discussion (17)

Editor guide
deciduously profile image
holywar20 profile image
Bryan Winter

Understanding Git concepts is easy. That takes like an hour. Understanding what it does when you type the command is hard. That part only comes from memory and the fear of explosions when you type the wrong thing.

Also bad architectural problems can be magnified with git. I used to work at a place that migrated an insane number of custom files into a single git-repo, and basically git add -A would result in silently adding thousands of files to your push, because it was configured to hide changes since it was so big you couldn't actually see the files you changed. Which meant manually tracking your file names on notepad and only adding those.

β€œA computer lets you make more mistakes faster than any other invention with the possible exceptions of handguns and Tequila.”

― Mitch Ratcliffe

ben profile image
jmfayard profile image
Jean-Michel Fayard πŸ‡«πŸ‡·πŸ‡©πŸ‡ͺπŸ‡¬πŸ‡§πŸ‡ͺπŸ‡ΈπŸ‡¨πŸ‡΄ • Edited

Personally I use GitHub desktop

$ brew cask install github

I know, no real developer and no true scotsman should use a GUI for git.

But in fact, GitHub desktop is 10 times more usable than the command-line.

joshwcorbett profile image
Josh Corbett

Gitkraken is by far the best GUI out there, no cap.

philnash profile image
Phil Nash
cd ..
rm -rf project
git clone PROJECT_REPO
cd project
# start again

I've done this too many times in my life.

waylonwalker profile image
recursivefaults profile image
Ryan Latta

Hang in there. Everyone goes through this.

99% of the issues come from not quite understanding how git tracks changes when you try to merge.

Frustrating but learnable.

.05% come from a bad rebase. This is a hellscape.

.05% is forgetting to add a file when you commit.

sargalias profile image
Spyros Argalias • Edited

Sorry, I know this is a month old post...

Reading through the Atlassian git tutorials (which took me a bit under a weekend) was really good. I went from beginner user to understanding git very well for all work purposes.

You can get anything else you need from Google.

For context, whenever my colleagues had git questions they usually came to me or one other developer. Either of us could always answer their questions.

The next resource on my list is Pro Git, I've heard good things about it. However it's very low priority at the moment because the Atlassian tutorials gave me pretty much all I need in terms of Git knowledge.

patryktech profile image
Patryk • Edited

Same. Haven't had any major accidents in years, thankfully, but it's cryptic for sure.

I quite enjoyed this talk: Rules to git by. It probably won't help with your issues, but if you've got 45 minutes to spare, it's worth a watch.

amberjones profile image

OhShit,Git!?! has saved me more than once

zacharythomasstone profile image
Zachary Stone

Don't mind me I am just bookmarking this for later...

manuelojeda profile image
Manuel Ojeda

There is not shame on it, I been using it since late 2017, is better late than never.
Also is recommend to focus learning to use it through CLI instead of desktop, there is more power via CLI 🀘

sirseanofloxley profile image
Sean Allin Newell

Ben; I believe in you!

brandinchiu profile image
Brandin Chiu

A great way to learn is by getting started with a git client. Then extrapolate what you're doing. Some clients will even show logs of the commands that get run when you push the buttons.

olore profile image
Brian Olore is a must have reference!

simbo1905 profile image
Simon Massey

I can highly recommend reading Git From The Bottom Up.