Skip to content

Explicitly specify initial branch to avoid being affected by global git config#1420

Merged
orta merged 3 commits into
danger:masterfrom
manicmaniac:independent-from-global-git-config
Jan 29, 2023
Merged

Explicitly specify initial branch to avoid being affected by global git config#1420
orta merged 3 commits into
danger:masterfrom
manicmaniac:independent-from-global-git-config

Conversation

@manicmaniac

Copy link
Copy Markdown
Member

Problem

Some specs always fail if init.defaultBranch is not master in ~/.gitconfig.

Cause

Those spec call git init and it determines the initial branch name by global git config since git 2.28.

Solution

I replaced every git init with git init -b master to set the initial branch.

@orta

orta commented Jan 29, 2023

Copy link
Copy Markdown
Member

Seems very reasonable to me 👍🏻

@orta orta merged commit f82cf35 into danger:master Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants