git
Core Idea
Git records source history as commits. A commit is a named checkpoint of tracked files.
In this course, git protects ~/src, not generated output in ~/public_html.
Basic Loop
cd ~/src
git status
git add pages/index.md
git commit -m "Update homepage"
git log --oneline -5
git push
Mental Model
- Working tree: files you are editing.
- Staging area: changes selected for the next commit.
- Commit: recorded checkpoint.
- Remote: another repository, such as Forgejo.
Common Commands
- git init: create a repository.
- git status: inspect state.
- git add: stage changes.
- git diff: inspect changes.
- git commit: record a checkpoint.
- git log: read history.
- git remote: inspect or set remote repositories.
- git push: send commits to Forgejo.
- git clone: copy a repository.
Watch Out
Run git status before git add, before git commit, and before git push. Most beginner git mistakes start with not reading status.
Docs Pointers
- Run
git help status,git help add,git help commit, andgit help push. - Read Pro Git.
- Read git basics and Forgejo publishing.

Linux Foundations