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 status

2 Stage 1: Review changed files

Git will show files that are:

  • modified
  • deleted
  • untracked
  • staged

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

site/_site/
site/.quarto/
local setup notes
private data
private logs
private prepared .dta files
scripts/stata/config/bnr_paths_LOCAL.do

site/_site/ is generated by Quarto.

It is a build output, not source material.

4 Stage 3: Check ignored files if needed

Example:

git check-ignore -v scripts\stata\config\bnr_paths_LOCAL.do

5 Stage 4: Stage only intended files

Avoid blindly staging everything if you are unsure.

git add path\to\file

Do not use:

git add .

unless you have carefully reviewed all changed and untracked files.

Back to top