Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 3

Push a new branch to existing repository using REST API v3 OR v4

I want to updatate the existing github project and push it as a new branch again to that repository  so that later pull request can be created.

I want to do this via REST API v3 OR graphQL.

I couldnt able to find the way to do that.

I am not sure but I think we can use tree api end point to do that.

Any example OR approach will be helpful.

 

Thanks

2 Replies
Community Manager
Message 2 of 3

Re: Push a new branch to existing repository using REST API v3 OR v4

Hi @dhananjayharel

 

Thanks for being here! You can do this using v3 as seen in this external post, I hope this helps!

 


Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Copilot Lvl 2
Message 3 of 3

Re: Push a new branch to existing repository using REST API v3 OR v4

Thanks.

So I can create a new branch using the API but I didnt able to find a to push my whoel projectcode into this new branch using REST API.

I think we can do it using trees API but couldnt able to find the specific example.