You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 27, 2025. It is now read-only.
I usually work in bare git repos (git init --bare/git clone --bare) and keep my worktrees in the worktree/ directory. This way, there's no need for .gitignore files, and it feels cleaner as opposed to having a worktrees/ directory nestled inside of my project. Here's an example of what it looks like:
~/test/git-worktree/bare/
├── hooks/
├── info/
├── logs/
├── objects/
├── refs/
├── rr-cache/
├── worktree/ # this is where I keep the actual worktrees that I cd into
│ ├── main/ # main branch
│ │ ├── .git
│ │ └── README.md
│ ├── foo/ # foo branch
│ │ ├── .git
│ │ ├── foo/
│ │ └── README.md
│ └── bar/ # bar branch
│ ├── .git
│ └── README.md
├── worktrees/ # this is where git keeps its metadata for the worktrees (that's why I name my worktree directory "worktree" and not "worktrees")
│ ├── main/
│ │ ├── logs/
│ │ ├── refs/
│ │ ├── COMMIT_EDITMSG
│ │ ├── commondir
│ │ ├── gitdir
│ │ ├── HEAD
│ │ ├── index
│ │ └── ORIG_HEAD
│ ├── foo/
│ │ ├── logs/
│ │ ├── refs/
│ │ ├── AUTO_MERGE
│ │ ├── commondir
│ │ ├── gitdir
│ │ ├── HEAD
│ │ ├── index
│ │ └── ORIG_HEAD
│ └── bar/
│ ├── logs/
│ ├── refs/
│ ├── AUTO_MERGE
│ ├── commondir
│ ├── gitdir
│ ├── HEAD
│ ├── index
│ └── ORIG_HEAD
├── config
├── description
└── HEAD
It would be nice if this was supported by the using-git-worktrees. For now, I'm maintaining a fork of this repo with that skill modified to suit my needs.
I usually work in bare git repos (
git init --bare/git clone --bare) and keep my worktrees in theworktree/directory. This way, there's no need for .gitignore files, and it feels cleaner as opposed to having aworktrees/directory nestled inside of my project. Here's an example of what it looks like:It would be nice if this was supported by the
using-git-worktrees. For now, I'm maintaining a fork of this repo with that skill modified to suit my needs.