22 ms·
This is similar to how I use worktrees. I have a worktree for the master/main branch; this is the current production branch. I have a worktree for test, which
by wvenable 2y ago
This is similar to how I use worktrees. I have a worktree for the master/main branch; this is the current production branch. I have a worktree for test, which contains current branch deployed for testing. And I have worktree for doing new development.
If I'm doing new development and bug report comes in, I can just open the production project. I don't need to stop what I'm doing in my development branch at all. I don't have to worry about build artifacts or other details that come when you just switch branches in place. I also really dislike stashing.
I don't know why they aren't more popular.
- trws 2y agoIf I had to guess, I’d say submodules. I work on a couple of projects with no submodules and find work trees great for those, but incredibly painful for the projects that have them. This seems to be getting better in newer git versions, but for a long time basic things like removing a worktree just flat didn’t work with populated submodules.
- wvenable 2y agoSubmodules are such a pain in the ass. None of my own projects use submodules but when I work on open source projects they never seem to work as expected.