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

Add implementation for git_remote_default_branch #1969

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mburtka
Copy link

@mburtka mburtka commented May 18, 2022

Implements the feature requested in #1796

This fetches the default branch from a remote repository. This is useful to detect changes, and when remotes are added following initialization.

@ghost
Copy link

ghost commented Jul 19, 2022

Hi @mburtka ,

May I suggest you to have a look at the similar functionality implemented in our fork and consider adopting (part of) it?

mendix/libgit2sharp@d6e7723

The difference is I believe that we've exposed the GetRemoteDefaultBranch as a static method on Repository class, so that the user could get a default branch name before they clone a repo.

@atiq-cs
Copy link

atiq-cs commented Dec 17, 2022

Is there any update on this?

Would love to set a default branch while initializing an empty repository. Thanks.

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