Kolam Ayer MakersLinux Foundations

Git Basics

Core Idea

Git records named checkpoints of source files. In this course, commit source under ~/src; do not treat generated HTML under ~/public_html/ as the source of truth.

The basic loop is:

edit source -> inspect changes -> stage changes -> commit -> push when ready

Practice Alone

Run these from ~/src:

git status
git diff
git add pages/index.md
git status
git commit -m "update homepage"
git log --oneline -3

Use git status before and after staging. It tells you which files are untracked, modified, staged, or clean.

Common Recovery

Done When

You can point to one file and say whether it is unstaged, staged, committed, or pushed.

Docs Pointers