Check Git status before commit
BNR info-hub Technical Manual
1 Check Git status before commit
1.1 Purpose
This guide explains how to check Git status before committing changes to the BNR info-hub repository.
The goal is to commit only intended, safe, useful files.
1.2 Basic command
From the repo root:
cd C:\yoshimi-hot\output\analyse-bnr\info-hub
git status2 Stage 1: Review changed files
NoteStep 1. Read the status output
Git will show files that are:
- modified
- deleted
- untracked
- staged
TipFiles that are usually expected
These may be expected after a briefing workflow update:
scripts/stata/...
outputs/public/...
site/downloads/files/...
site/surveillance/...
site/technical/...
CHANGELOG.md
DECISIONS.md
3 Stage 2: Watch for files that should not be committed
WarningDo not commit these
site/_site/
site/.quarto/
local setup notes
private data
private logs
private prepared .dta files
scripts/stata/config/bnr_paths_LOCAL.do
NoteWhy
_site should not be committed
site/_site/ is generated by Quarto.
It is a build output, not source material.
4 Stage 3: Check ignored files if needed
NoteStep 1. Check whether a file is ignored
Example:
git check-ignore -v scripts\stata\config\bnr_paths_LOCAL.do5 Stage 4: Stage only intended files
NoteStep 1. Use selective staging
Avoid blindly staging everything if you are unsure.
git add path\to\file
WarningAvoid careless bulk staging
Do not use:
git add .unless you have carefully reviewed all changed and untracked files.