Skip to content

How do I create a new branch with PyGithub? #2619

Answered by sheeehy
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

You first need to get the commit that the branch should point to, and then create a reference from this commit. You should be able to use repo.create_git_ref()

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant