Git Rituals
“Ink without preservation is just spilt thought.”
This is the bare minimum Git you need to keep the Grand Archives of Sacro Elcarion updated.
No branching wizardry, no rebasing nightmares, just the daily rituals.
1. The usual flow
Section titled “1. The usual flow”When you’ve added or edited notes in the Archives folder:
- See what changed
- Stage the changes
- Commit them with a message
- Push to the remote (GitHub)
In terminal (inside the repo folder):
# 1. See what changedgit status
# 2. See the exact lines changed (optional)git diff
# 3. Stage everything you've changedgit add .
# 4. Commit with a messagegit commit -m "Update session notes and lore"
# 5. Push to GitHubgit pushThat’s the main ritual. If you only remember this, you’re fine.
2. Before you start writing: pull latest
Section titled “2. Before you start writing: pull latest”If someone else (or future you on another machine) has made changes, pull first:
git pullThis grabs the latest version of the Grand Archives from GitHub before you begin editing.
Habit:
- Sit down to work -
git pull - Finish your updates -
git status>git add .>git commit>git push
3. Reading the status like an archivist
Section titled “3. Reading the status like an archivist”git statusYou’ll see files as:
- modified: you changed them
- new file: you created them
- deleted: you removed them
Anything under “Changes to be committed” is already staged.
Anything under “Changes not staged for commit” still needs git add.
4. Making clean, meaningful commits
Section titled “4. Making clean, meaningful commits”Good commit messages help you remember what changed later.
Examples:
git commit -m "Add Session 05 recap and Emberfall updates"git commit -m "Create template for conflicts under Lore"git commit -m "Update Elion NPC details and fix typos"Avoid:
git commit -m "stuff"git commit -m "fix"git commit -m "idk man"Your future self will hate you.
5. If Git complains about conflicts
Section titled “5. If Git complains about conflicts”Sometimes, after a git pull, Git may say there are merge conflicts.
This means both your local copy and the GitHub copy changed the same lines.
VS Code or your editor will usually highlight this with markers like:
<<<<<<< HEADyour version=======remote version>>>>>>> mainYou’ll need to:
- Edit the file to choose or merge the correct lines.
- Remove the conflict markers (
<<<<<<<,=======,>>>>>>>). - Stage and commit again:
git add path/to/file.mdgit commit -m "Resolve merge conflict in session notes"git pushIf it looks scary: stop, ask the Scribe.
6. Undoing mistakes (light version)
Section titled “6. Undoing mistakes (light version)”You staged too much
Section titled “You staged too much”git resetThis un-stages everything but keeps your file changes.
You changed a file but haven’t committed yet
Section titled “You changed a file but haven’t committed yet”git checkout -- path/to/file.mdThis discards your local changes to that file and resets it to the last committed version.
⚠️ This cannot be undone. Only use this if you’re sure you don’t want your edits.
7. Quick reference
Section titled “7. Quick reference”git status # What changed?git diff # What exactly changed?git add . # Stage all changesgit commit -m "..." # Save a snapshot with a messagegit pull # Get latest from GitHubgit push # Send your changes to GitHubIf you ever feel lost, this sequence will usually get you home:
git statusgit pullgit add .git commit -m "Update Archives"git pushThe Archives don’t demand perfection, only consistency.