Skip to content

Use remote HEAD branches as default base branches#127

Merged
foriequal0 merged 3 commits intomasterfrom
default-branch
Aug 1, 2020
Merged

Use remote HEAD branches as default base branches#127
foriequal0 merged 3 commits intomasterfrom
default-branch

Conversation

@foriequal0
Copy link
Copy Markdown
Owner

@foriequal0 foriequal0 commented Aug 1, 2020

resolves: #97

With this PR, git-trim will not use hard-coded default base branches anymore. It'll deduce a default base branch from refs/remotes/*/HEAD. Since git 2.28 has introduced init.defaultBranch option which can change the default branch name, it is required to make git-trim more resilient to different default branch names.

Previous default base branches develop,master were hardcoded while keeping git-flow in mind. Users of multi-base branching scheme, such as git-flow, should set git config trim.bases develop,master in order to use as it was.

@foriequal0 foriequal0 added enhancement New feature or request breaking changes labels Aug 1, 2020
@foriequal0 foriequal0 changed the title Use remote HEAD branch as base branch Use remote HEAD branches as default base branches Aug 1, 2020
@foriequal0 foriequal0 merged commit 0726a32 into master Aug 1, 2020
@foriequal0 foriequal0 deleted the default-branch branch August 1, 2020 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking changes enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect default branch using refs/remotes/$REMOTE/HEADs

1 participant