Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default branch used to be 'master' but now becomes 'main' #21

Closed
JohannesEH opened this issue Feb 10, 2021 · 5 comments
Closed

Default branch used to be 'master' but now becomes 'main' #21

JohannesEH opened this issue Feb 10, 2021 · 5 comments
Assignees

Comments

@JohannesEH
Copy link
Contributor

Make gcm and similar 'master' oriented commands configurable and/or check for 'main'/'master' branches and select correct branch accordingly. The default should probably be 'main' as this is the new default branch name on a lot of git hosts like GitHub, Bitbucket, Azure DevOps, to mention a few.

Finally i just wanted to say thanks for these aliases. I'm using them every day. :)

@JohannesEH
Copy link
Contributor Author

I can see in oh-my-zsh that they make this configurable by checking using a function git_main_branch which checks for existence of branches 'main' and 'trunk' in that order and outputs the first one it finds, or if outputs 'master' if none is found.

@gluons gluons self-assigned this Feb 11, 2021
@gluons gluons closed this as completed in f266ff3 Feb 20, 2021
@gluons
Copy link
Owner

gluons commented Feb 20, 2021

Done. Released in v0.3.0. 😃

@JohannesEH
Copy link
Contributor Author

Nice! Didn't see that you fixed this. Thank you! 👍❤️

@JohannesEH
Copy link
Contributor Author

Note: De to a bug in PowerShell Core 7.1 the current Get-Git-MainBranch implementation wont work. We can fix it by chaging the $? checks with $LASTEXITCODE checks. See PR #25

@gluons
Copy link
Owner

gluons commented Apr 15, 2021

Note: De to a bug in PowerShell Core 7.1 the current Get-Git-MainBranch implementation wont work. We can fix it by chaging the $? checks with $LASTEXITCODE checks. See PR #25

Done. Released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants