Skip to content

chore: untrack prog binary and fix stale ignore rules - #5

Merged
baiirun merged 1 commit into
mainfrom
chore/untrack-build-output
Sep 23, 2026
Merged

baiirun merged 1 commit into
mainfrom
chore/untrack-build-output

Conversation

@baiirun

@baiirun baiirun commented Sep 23, 2026

Copy link
Copy Markdown
Owner

The compiled prog binary (13 MB) is tracked in git, so every local rebuild shows up as a modified file and invites committing build output by accident. It was sitting dirty in the working tree when I found it.

The cause is an unfinished rename. The # Binary section of .gitignore still listed /tasks and /cmd/tasks/tasks, names from when this project was called tasks. Neither path exists in the tree anymore, so no rule covered either current build target and nothing flagged the root binary when it was committed.

What changed

  • git rm --cached prog drops the binary from the index. The file stays on disk, so nobody loses their local build.
  • The two existing ignore lines are repointed at the real targets, /prog and /cmd/prog/prog. The untracked cmd/prog/prog was never committed but was also never ignored; it is now.

Two files, two lines changed, plus the deletion.

Before / after

Before, git status in a freshly built checkout reported M prog and ?? cmd/prog/prog. After, both are ignored and the tree is clean after a build.

Scope

Index and ignore rules only — no source, schema, or CLI behavior changes. Releases are unaffected: .goreleaser.yaml builds from ./cmd/prog for linux/darwin on amd64/arm64 and ships tar.gz archives, so the committed binary was never the distribution path.

The binary blobs remain in history, so this does not shrink clone size. That needs a separate history rewrite, deliberately not attempted here.

🤖 Generated with Claude Code

The compiled `prog` binary (13 MB) was tracked in git, so every local
rebuild surfaced as a modified file and invited accidental commits of
build output.

The cause is a rename that was never finished: the `# Binary` section of
`.gitignore` still listed `/tasks` and `/cmd/tasks/tasks` from when this
project was called `tasks`. Neither path exists anymore, so no ignore
rule covered either of the current build targets, and the root binary was
committed at some point without anything flagging it.

This drops `prog` from the index with `git rm --cached`, leaving the file
in place on disk, and repoints the two existing ignore lines at the real
targets, `/prog` and `/cmd/prog/prog`.

Scope: index and ignore rules only. No source, schema, or behavior
changes. The binary blobs remain in history, so this does not shrink the
repository — that would take a separate history rewrite.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@baiirun
baiirun merged commit 53235da into main Sep 23, 2026
3 of 4 checks passed
@baiirun
baiirun deleted the chore/untrack-build-output branch September 23, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant