{"thread":{"id":"41203","subject":"git worktree bug: paths are being reset to the main repository directory","startedAt":"2016-01-15T20:23:55Z","lastAt":"2016-01-15T20:23:55Z","messageCount":1,"participants":["Daniel Egger"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"276200","messageId":"FACC48AE-B1A9-4A13-9CC8-889996F3113D@eggers-club.de","threadId":"41203","inReplyTo":null,"subject":"git worktree bug: paths are being reset to the main repository directory","fromName":"Daniel Egger","fromEmail":"daniel@eggers-club.de","sentAt":"2016-01-15T20:23:55Z","receivedAt":"2016-01-15T20:23:55Z","isPatch":false,"sender":{"key":"daniel@eggers-club.de","avatar":null},"body":"Hi guys,\n\ndoing a git reset --hard in one of the worktrees will reset the path in $GIT_DIR/worktrees/worktree_name/gitdir to .git, so after that point all thusly modified worktrees will look as if they live in current woorktree root.\n\nState before:\n\n# cd /Users/user/Desktop/Source/Product && git worktree list\n/Users/user/Desktop/Source/Product          2991e32 [master]\n/Users/user/Desktop/Source/Product-2.1      3fc1082 [releases/master-2.1]\n/Users/user/Desktop/Source/Product-2.2      3ccc3fe [releases/master-2.2]\n/Users/user/Desktop/Source/Product-2.3      4044881 [releases/master-2.3]\n/Users/user/Desktop/Source/Product-2.3-S11  4a67d36 [customer/S11]\n/Users/user/Desktop/Source/Product-2.2-S22  2d2503a [customer/S22]\n\n# pushd /Users/user/Desktop/Source/Product-2.2; git reset --hard; popd\n\n# git worktree list\n/Users/user/Desktop/Source/Product          2991e32 [master]\n/Users/user/Desktop/Source/Product-2.1      3fc1082 [releases/master-2.1]\n/Users/user/Desktop/Source/Product          3ccc3fe [releases/master-2.2]\n/Users/user/Desktop/Source/Product-2.3      4044881 [releases/master-2.3]\n/Users/user/Desktop/Source/Product-2.3-S11  4a67d36 [customer/S11]\n/Users/user/Desktop/Source/Product-2.3-S33  174575e [customer/S33]\n/Users/user/Desktop/Source/Product-2.2-S22  2d2503a [customer/S22]\n\n3ccc3fe is now (incorrectly) claimed to be represented in <pwd>.\n\nServus,\n      Daniel\n"}]}