Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

How to create remote branch? #481

Closed
svetomir opened this issue Jul 14, 2017 · 1 comment
Closed

How to create remote branch? #481

svetomir opened this issue Jul 14, 2017 · 1 comment
Labels

Comments

@svetomir
Copy link

svetomir commented Jul 14, 2017

Hi,

Can you please write an example on how to create branch from an existing branch in a remote repository?

git checkout -b release develop
git push origin release

Thanks a lot

@orirawlings
Copy link
Contributor

The push step is well covered by _examples/push/main.go. The harder part here is creating the new branch.

Currently the API is a little awkward for creating new references in a Repository. This affects creating branches and lightweight tags. #430 has an example for creating lightweight tags.

We would probably benefit from some CreateBranch and/or CreateTag methods in Repository.

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

No branches or pull requests

3 participants