You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dulwich-discuss
Hello,
I guess I should preface this with I am using only the porcelain layer of dulwich so far. If I need to go into the plumbing then so be it.
I can see through porcelain how to create a branch, but it does not make it the active branch upon creation. I don't see a mechanism to do the equivalent of `git checkout -b <branch-name>`.
Or how to do `git checkout <branch-name>`, after the branch is created.
Am I overlooking something in porcelain?
I need to push my newly created branch as well, but I haven't gotten that far, since all my commits are being made on master after I create my branch.
Thanks in advance,
Nathan Menge
Jelmer Vernooij
unread,
Jul 22, 2017, 7:49:49 AM7/22/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Nathan Menge, dulwich-discuss
Hi Nathan,
There indeed isn't really a way to do "git checkout -b" with the
porcelain yet. The main blocker for this functionality is
https://github.com/jelmer/dulwich/issues/452 - porcelain currently
doesn't do working tree merges.
For what you're trying to do, just changing the branch (without
merging working tree changes) should be sufficient sufficient - i.e.
"git branch blah". You should be able to just use
dulwich.porcelain.set_symbolic_ref(b"refs/heads/blah") to change the
currently active branch after you have created a branch.