Clean up Git status
BNR info-hub Technical Manual
1 Clean up Git status
1.1 Purpose
Use this guide before committing changes to the BNR info-hub repository.
The goal is to commit only intentional source files, approved public outputs, and documentation updates.
Do not commit private data, local configuration, generated site output, caches, logs, or temporary files.
2 Stage 1: Check Git status
cd C:\yoshimi-hot\output\analyse-bnr\info-hub
git statusFor a shorter view:
git status -s3 Stage 2: Know what should usually be tracked
Expected tracked changes may include:
scripts/stata/
site/
site/downloads/files/
outputs/public/
README.md
DECISIONS.md
CHANGELOG.md
For the case-count pilot, expected tracked changes may include:
scripts/stata/briefings/cvd_cases_2023/cvd_cases_2023.do
scripts/stata/common/bnrcvd_prep_2023_v1.do
scripts/stata/common/bnrcvd_globals.do
outputs/public/briefings/cvd_cases_2023_v1/
site/downloads/files/briefings/cvd_cases_2023_v1/
site/surveillance/cvd/briefings/case-counts.qmd
site/surveillance/cvd/briefings/case-counts-pdf.qmd
site/technical/
site/operations-manual/
4 Stage 3: Know what should not be tracked
These should normally not be committed:
site/_site/
site/.quarto/
site/_freeze/
local-setup-notes.md
scripts/stata/config/bnr_paths_LOCAL.do
info-hub-private/
*.dta
*.log
*.smcl
*.gph
Confidential source data and private working files must stay outside the repo in:
C:\yoshimi-hot\output\analyse-bnr\info-hub-private\
They should never appear in Git status.
5 Stage 4: Check ignored files if needed
To check whether a file is ignored:
git check-ignore -v path\to\fileExample:
git check-ignore -v scripts\stata\config\bnr_paths_LOCAL.doThis should show that the local path file is ignored.
6 Stage 5: Stage only intended files
Stage by folder or file:
git add scripts\stata
git add outputs\public
git add site\surveillance\cvd\briefings
git add site\downloads
git add site\technical
git add site\operations-manualThen check status again:
git statusgit add .
Avoid:
git add .unless you have already checked that no unwanted files appear in Git status.
7 Stage 6: Commit with a clear message
Example:
git commit -m "Add static CVD case-count briefing workflow"For documentation-only changes:
git commit -m "Add technical manual troubleshooting guides"8 Stage 7: Final safety check before push
Before pushing, run:
git statusExpected result:
nothing to commit, working tree clean
Then push:
git push