-
Notifications
You must be signed in to change notification settings - Fork 533
Add default_branch feature #531
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
Comments
CAMOBAP
added a commit
to CAMOBAP/ruby-git
that referenced
this issue
Jul 15, 2021
CAMOBAP
added a commit
to CAMOBAP/ruby-git
that referenced
this issue
Jul 15, 2021
Signed-off-by: Alex Bobrikovich <abobrikovich@gmail.com>
CAMOBAP
added a commit
to CAMOBAP/ruby-git
that referenced
this issue
Jul 15, 2021
Signed-off-by: Alexande B <abobrikovich@gmail.com>
A friendly reminder that this issue had no activity for 60 days. |
CAMOBAP
added a commit
to CAMOBAP/ruby-git
that referenced
this issue
Jan 31, 2022
Signed-off-by: Alexande B <abobrikovich@gmail.com>
This would be a very helpful change. |
GitHub has since changed the default branch to main, accompanied by most in the industry. Is it possible to merge this feature soon? It’s been a year and a half. I wonder if others who use ruby-git simply switch to vanilla command line git due to this… |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Subject of the issue
Currently, GitHub suggest renaming of default branch from
master
tomain
https://stevenmortimer.com/5-steps-to-change-github-default-branch-from-master-to-main/But in ruby-git in many places
master
used as the default branch https://github.com/ruby-git/ruby-git/blob/master/lib/git/base.rb#L345My proposal to add new method
git.default_branch
which will dogit symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@' master
based on https://stackoverflow.com/a/44750379/902217Your environment
Steps to reproduce
Expected behaviour
Have a possibility to get default branch
Actual behaviour
For now it's not possible to get default branch
The text was updated successfully, but these errors were encountered: