Skip to content
Courses/Aulafy foundations/Git, small commits, and AGENTS.md

Git, small commits, and AGENTS.md

Git is not just saving code: in AI projects it is how you review, correct, and rely less on magic.

Configure your identity

TerminalCode
git config --global user.name "Your Name"
git config --global user.email "you@email.com"
git config --global init.defaultBranch main

The minimum workflow

TerminalCode
git status
git diff
git add .
git commit -m "Add local AI prototype"
git log --oneline -5

AI can write a lot very quickly. Your defense is small changes, reviewed diffs, and explicit verification before accepting a large modification.

AGENTS.md as a working contract

AGENTS.md tells the agent how work happens in that repository: commands, style, limits, important paths, tests, and things it should not touch without permission.

TerminalCode
# AGENTS.md

## Commands
- npm run lint
- npm run build

## Rules
- Do not edit .env or secrets.
- Keep changes small and verifiable.
- Before touching UI, check mobile and desktop.
- Explain tests run before finishing.

Files that should not enter Git

TerminalCode
# .gitignore
.venv/
.env
*.log
*.gguf
models/
__pycache__/
.DS_Store

Do not commit large models, keys, private vector databases, or customer data. Version recipes, scripts, prompts, and safe configuration.