Repository navigation
feat(desktop): enable push.autoSetupRemote on worktree creation - #1267
Conversation
Set push.autoSetupRemote=true in each worktree's local git config so the first `git push` automatically creates the remote branch and sets upstream tracking, similar to `git push -u origin <branch>`. Applied to all three creation paths: new branch, existing branch, and PR checkout.
📝 WalkthroughWalkthroughThis PR adds automatic upstream branch configuration to three git worktree creation paths in the desktop app. After creating a worktree, the code now enables Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
push.autoSetupRemote=truein each worktree's local git config after creationgit pushnow automatically creates the remote branch and sets upstream tracking (likegit push -u origin <branch>)^{commit}trick which prevents the wrong upstream (origin/main) from being setTest plan
git config --local push.autoSetupRemotereturnstruein the worktreegit pushfrom the worktree terminal → verify it pushes and sets upstream without needing-uSummary by CodeRabbit
-uflag.