Ignore default state.json in git #16

Closed
opened 2026-05-11 18:52:28 +02:00 by heiko · 2 comments
Owner

Problem

The default runtime state file is ./state.json, but .gitignore does not ignore /state.json.

The current working tree already shows state.json as untracked.

Expected

Operational mailbox state should not be easy to commit accidentally.

Suggested fix

Add /state.json to .gitignore.

## Problem The default runtime state file is `./state.json`, but `.gitignore` does not ignore `/state.json`. The current working tree already shows `state.json` as untracked. ## Expected Operational mailbox state should not be easy to commit accidentally. ## Suggested fix Add `/state.json` to `.gitignore`.
Author
Owner

Branch renamed per convention:

Old: regression/issue-16-ignore-state-json
New: fix/16-ignore-state-json

The old remote branch has been deleted.

Branch renamed per convention: Old: regression/issue-16-ignore-state-json New: fix/16-ignore-state-json The old remote branch has been deleted.
Author
Owner

Resolved locally by adding /state.json to .git/info/exclude.

This keeps the runtime state file out of this working tree's status without changing the repository-wide .gitignore. Verified with:

git check-ignore -v state.json

Result: .git/info/exclude:7:/state.json state.json

Resolved locally by adding /state.json to .git/info/exclude. This keeps the runtime state file out of this working tree's status without changing the repository-wide .gitignore. Verified with: git check-ignore -v state.json Result: .git/info/exclude:7:/state.json state.json
heiko closed this issue 2026-05-11 20:41:50 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
IUS/xr-invoiced#16
No description provided.