# git: Prefer main over master when detecting default branch \(\#57398\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/950fd46d5c964bfb46e0bae9468de35c37e58186)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 950fd46d5c964bfb46e0bae9468de35c37e58186

Requested commit: 950fd46d5c964bfb46e0bae9468de35c37e58186

Commit: 950fd46d5c964bfb46e0bae9468de35c37e58186

Tree: b4b99db0bea3eca4792470011ac0c908480e9008

Author: Henrique Ferreiro

Committer: GitHub

## Message

```
git: Prefer main over master when detecting default branch (#57398)

Many projects are switching to main as the default branch name. Prefer
it over master, in case both are present.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A or Added/Fixed/Improved ...
```

## Parents

- [6d605b393cea083a8c8b4bdbc2c78ab26704900a](https://git.cafe/gitcafe/zed/commit/6d605b393cea083a8c8b4bdbc2c78ab26704900a?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/950fd46d5c964bfb46e0bae9468de35c37e58186?format=markdown)
