r/git • • Oct 20 '26

tutorial What Git stuff should a beginner actually know before their first team project?

https://youtu.be/KCBOEZe-J9M

Not the 200 commands, just the minimum so you don’t embarrass yourself on day one. My list:

  • git init / git clone
  • add + commit (and why they’re separate)
  • git log --oneline to see what happened
  • branches: git switch -c something, then merge back
  • how to fix a merge conflict without panicking
  • push / pull
  • .gitignore so you don’t commit your API keys or node_modules

Then pull requests as the next step.

Did I miss anything you’d consider essential? I turned this list into a 5 min video for beginners!

0 Upvotes

6 comments sorted by

3

u/bostonaholic Oct 20 '26

Solid list. I'd add git status early and often, and git diff --staged before every commit so you know what you're actually committing. Also learn git reflog before you need it. It's the undo button for almost everything, and knowing it exists takes a lot of the panic out of day one.

9

u/CarolXZosiaNsfwScene Oct 20 '26

Mention that git is not github.

The amount of newbies confusing those two things is too damn high.

1

u/Broad-Promise6954 ancient Oct 21 '26

That is mentioned in the video, which is good.

I note it also mentions (quietly) that push and pull aren't opposites of each other, but I think it could stand to be shouted, something along the lines of "PUSH NEVER MERGES! If merge work is required, you must do that some other way, whether that's in your own repository on your own computer, or using one of those fancy merge request operations on the hosting site."

2

u/FlamingDrakeTV Oct 20 '26

Rebase will be your greatest ally and biggest foe. But it's by far the most used command I use.

Just be ready to pick up the pieces when you inevitably do something stupid with it.

1

u/ryan_builds_ci Oct 21 '26

i'd add git stash and git restore. half the beginner panic is 'i have changes i don't want right now' and those two cover it. maybe also pull --rebase vs merge so the first PR isn't full of 'merge branch main' commits

1

u/bratzlaff Oct 25 '26

I would say that fetch and merge should be learned before any mention of pull