Git Essentials

Terminology

T'Chaka Dev· 13 pages· 6 min read

Git and people who use it talk in a different terminology. They don't call it a folder, they call it a repository. They don't call it an alternative timeline, they call it a branch — though alternative timeline is honestly the better name.

Check your git version

Git is very stable software — breaking changes are rare. Confirm what you're running:

bash
git --version

Repository

A repository is a collection of files and directories stored together — like a folder, but tracked. There's a difference between having git on your system and asking it to track a particular folder. Check the current state anytime:

bash
git status
DIAGRAM tracked folders in green, untracked in red, with the .gitignore gate between them

Your config settings

Every checkpoint records who made it. Set your identity once, globally:

bash
git config --global user.email "you@wakanda.dev" git config --global user.name "Your Name" git config --list

Commit

A commit is a snapshot of your code at a point in time — a saved checkpoint you can always return to. The usual flow:

DIAGRAM working directory → staging area → commit, arrows labeled add and commit

Complete git flow

Init to track, add to stage, commit to checkpoint, push to publish:

bash
git init git add . git commit -m "first checkpoint" git push origin main
DIAGRAM the complete loop including the push to GitHub

Atomic commits — each commit is one self-contained unit of work. If one fails, step back to the previous checkpoint and fix. A clean history is a warrior's history.

Logs and gitignore

git log --oneline shows compact history. A .gitignore file keeps secrets and clutter out of tracking:

gitignore
node_modules .env .vscode

Conclusion

You now speak git: init, add, commit, log. Next we go behind the scenes to see what the .git folder actually holds.