BrianWeiHaoMa

Git Dupe — Git skill for Claude Code

Git community

A second Git repo inside .git for the files that are yours, not the project's (.env.local, notes, your own CLAUDE.md).

How to install Git Dupe

This entry records only its repository, not the path inside it, so there is no exact command to give. Open BrianWeiHaoMa/git-dupe and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Git Dupe does

A second Git repo inside .git for the files that are yours, not the project's (.env.local, notes, your own CLAUDE.md). Versioned and synced, and git status never sees them.

Alternatives in Git

  • Bulletproof Quick Start Guide — Target Audience: Complete beginners Never used Python/git before 11.1k ★
  • Git Status — Read the Files and run the Commands and summarize the current state of the git repository 3.4k ★
  • Get Commit Details — git show --name-status [COMMIT_ID] git diff [COMMIT_ID]^ [COMMIT_ID] 1.3k ★

README

git-dupe

[![CI](https://github.com/BrianWeiHaoMa/git-dupe/actions/workflows/ci.yml/badge.svg)](https://github.com/BrianWeiHaoMa/git-dupe/actions/workflows/ci.yml) [![Latest release](https://img.shields.io/github/v/release/BrianWeiHaoMa/git-dupe)](https://github.com/BrianWeiHaoMa/git-dupe/releases/latest) [![License: MIT](https://img.shields.io/github/license/BrianWeiHaoMa/git-dupe)](LICENSE)

git-dupe versions the files in a checkout that are yours and not the project's: `.env.local`, notes, plans, scratch scripts, editor settings, your own instructions file for a coding agent. They stay where their tools expect them in the working tree. Their history lives in a second, ordinary Git repository inside the project's `.git`, hidden from the project's `git status` and `git add -A`, and moves between your machines through a private remote of your own. Public work is `git …`; private work is `git dupe …`, with Git's own commands, options, output, and exit codes.

"Dupe" as in a duplicate of your checkout that only you see; it has nothing to do with duplicate files. Linux only and Git 2.43 or newer, for now. What it does not do yet is under [Limits](#limits), and `git dupe detach` takes it back out.

A terminal transcript. git status --short lists CLAUDE.md and notes/ as untracked. After git dupe init, git dupe add notes/ CLAUDE.md, git dupe add -f .env.local, and git dupe commit -m 'my private files', git status --short prints nothing, and git dupe log --oneline shows the one private commit.

Quick start

In a clone of a project, from the root. Here `notes/` is a directory of yours, and `.env.local` a file of yours that the project's `.gitignore` ignores:

git dupe init                             # attach an empty private repository
git dupe add notes/                       # hide notes/ from the project and stage it
git dupe add -f .env.local                # a file the project ignores takes -f
git dupe commit -m "