{"action":"created","issue":{"url":"https://api.github.com/repos/sindresorhus/np/issues/39","repository_url":"https://api.github.com/repos/sindresorhus/np","labels_url":"https://api.github.com/repos/sindresorhus/np/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/np/issues/39/comments","events_url":"https://api.github.com/repos/sindresorhus/np/issues/39/events","html_url":"https://github.com/sindresorhus/np/issues/39","id":160771497,"number":39,"title":"Fatal error when pushing to GitHub","user":{"login":"aymericbeaumet","id":569243,"avatar_url":"https://avatars.githubusercontent.com/u/569243?v=3","gravatar_id":"","url":"https://api.github.com/users/aymericbeaumet","html_url":"https://github.com/aymericbeaumet","followers_url":"https://api.github.com/users/aymericbeaumet/followers","following_url":"https://api.github.com/users/aymericbeaumet/following{/other_user}","gists_url":"https://api.github.com/users/aymericbeaumet/gists{/gist_id}","starred_url":"https://api.github.com/users/aymericbeaumet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aymericbeaumet/subscriptions","organizations_url":"https://api.github.com/users/aymericbeaumet/orgs","repos_url":"https://api.github.com/users/aymericbeaumet/repos","events_url":"https://api.github.com/users/aymericbeaumet/events{/privacy}","received_events_url":"https://api.github.com/users/aymericbeaumet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-16T22:03:08Z","updated_at":"2016-06-16T22:14:42Z","closed_at":null,"body":"#### Issue\r\n\r\nWhile executing `np major`, a git-related error occurs while trying to push to GitHub.\r\n\r\n```\r\n$ np major\r\n[ ... ]\r\nfatal: You didn't specify any refspecs to push, and push.default is \"nothing\".\r\n ✖ Exitted with status 128.\r\n```\r\n\r\n#### Cause\r\n\r\n[This line](https://github.com/sindresorhus/np/blob/40168aab237f6a11ee8585a605b56919252c574b/index.js#L57) does not specify the remote nor the branch, which is mandatory when having this in `~/.gitconfig`:\r\n\r\n```\r\n[push]\r\n  default = nothing\r\n```\r\n\r\n#### Reproduce bug\r\n\r\n```\r\n$ git config --global push.default nothing\r\n$ np major\r\n```\r\n\r\n#### Possible fix\r\n\r\nMake sure the remote and the branch are both specified:\r\n\r\n```javascript\r\nexec('git', ['push', 'origin', 'master', '--follow-tags']);\r\n```"},"comment":{"url":"https://api.github.com/repos/sindresorhus/np/issues/comments/226629560","html_url":"https://github.com/sindresorhus/np/issues/39#issuecomment-226629560","issue_url":"https://api.github.com/repos/sindresorhus/np/issues/39","id":226629560,"user":{"login":"aymericbeaumet","id":569243,"avatar_url":"https://avatars.githubusercontent.com/u/569243?v=3","gravatar_id":"","url":"https://api.github.com/users/aymericbeaumet","html_url":"https://github.com/aymericbeaumet","followers_url":"https://api.github.com/users/aymericbeaumet/followers","following_url":"https://api.github.com/users/aymericbeaumet/following{/other_user}","gists_url":"https://api.github.com/users/aymericbeaumet/gists{/gist_id}","starred_url":"https://api.github.com/users/aymericbeaumet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aymericbeaumet/subscriptions","organizations_url":"https://api.github.com/users/aymericbeaumet/orgs","repos_url":"https://api.github.com/users/aymericbeaumet/repos","events_url":"https://api.github.com/users/aymericbeaumet/events{/privacy}","received_events_url":"https://api.github.com/users/aymericbeaumet/received_events","type":"User","site_admin":false},"created_at":"2016-06-16T22:14:42Z","updated_at":"2016-06-16T22:14:42Z","body":"I guess it's a matter of personal taste, I like the strictness brought by having to specify the remote/branch. Still I would like to be able to use `np`.\r\n\r\nMaybe something in the lines of: `np major --remote=origin --branch=master`"}}
{"actor":{"display_login":"aymericbeaumet"}}