{"action":"opened","issue":{"url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/issues/610","repository_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git","labels_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/issues/610/labels{/name}","comments_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/issues/610/comments","events_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/issues/610/events","html_url":"https://github.com/isomorphic-git/isomorphic-git/issues/610","id":386533590,"node_id":"MDU6SXNzdWUzODY1MzM1OTA=","number":610,"title":"Add option to branch function to checkout branch after creating","user":{"login":"mojavelinux","id":79351,"node_id":"MDQ6VXNlcjc5MzUx","avatar_url":"https://avatars2.githubusercontent.com/u/79351?v=4","gravatar_id":"","url":"https://api.github.com/users/mojavelinux","html_url":"https://github.com/mojavelinux","followers_url":"https://api.github.com/users/mojavelinux/followers","following_url":"https://api.github.com/users/mojavelinux/following{/other_user}","gists_url":"https://api.github.com/users/mojavelinux/gists{/gist_id}","starred_url":"https://api.github.com/users/mojavelinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mojavelinux/subscriptions","organizations_url":"https://api.github.com/users/mojavelinux/orgs","repos_url":"https://api.github.com/users/mojavelinux/repos","events_url":"https://api.github.com/users/mojavelinux/events{/privacy}","received_events_url":"https://api.github.com/users/mojavelinux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-02T06:57:42Z","updated_at":"2018-12-02T06:57:42Z","closed_at":null,"author_association":"NONE","body":"As a convenience, it would be nice if the `branch` function offered an option to checkout a branch after it's created. Often, when you create a branch, you also want to switch to it. This would eliminate a step in the calling code. This is similar to the `checkout -b` command in git. I'm thinking the option could be `checkout = true`.\r\n\r\n```js\r\ngit.branch({ ...repo, ref: 'develop', checkout: true })\r\n```\r\n\r\nThe alternative would be to add this functionality to `checkout` (something like `create = true`). Right now, the `checkout` command will implicitly create a new remote tracking branch, but that's not the same use case as creating a local branch (unless I'm mistaken)."}}
{"actor":{"display_login":"mojavelinux"}}