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
nothing to commit: save the file, check that you are in~/src, then rungit statusagain.- Missing identity: run
git config --global user.name "$(whoami)"andgit config --global user.email "$(whoami)@kolamayermakers.org", then retry the commit. - Scratch file appears in status: add a deliberate
.gitignorerule before broad staging. - Unsure what changed: run
git diffbeforegit add.
Done When
You can point to one file and say whether it is unstaged, staged, committed, or pushed.
Docs Pointers
- Read git, git status, git add, git commit, and git log.
- Read Forgejo publishing when you are ready to push.

Linux Foundations