Repository navigation
Conversation
In a triangular workflow, when creating a new branch, one typically specifies `origin/main` as the start-point to ensure the branch tracks the upstream default branch. Since `git-wt` is aware when a new branch is being created, it would be convenient if it could automatically set the start-point argument in such cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One of the benefits of git-wt is that creating a worktree and switching to it requires only a single argument: the branch name.
However, in a triangular workflow, when creating a new branch, I want to specify origin/main as the start-point so that the new local branch tracks origin/main. Having to specify origin/main every time I create a new branch is cumbersome and undermines the simplicity of git-wt.
This PR adds the wt.startpoint configuration (and the --startpoint flag), allowing a default start-point to be configured so that I can continue creating worktrees with just the branch name. An explicitly specified start-point takes precedence over the configured default.