5 ms·
Hub Git Wrapper
- suprjami 11y agoI once tried to PR from hub. It sent the PR from my branch on my fork to master on my fork. Obviously I wished to PR against the original thing I forked from. I just stick to the web interface now.
- emacsfodder 11y agoWhat you needed was to use the options -h (head, ie. the feature branch) and -b (base, ie the upstream master) eg. git pull-request \ -m "I added an awesome feature"\ -b baserepo:master\ -h myfork:feature-branch
- justinsb 11y agoThe GitHub web interface defaults to the PR-to-upstream behavior though, so this is at least an inconsistency; I would argue it is a bug.
- ultrafez 11y agoYou could submit a pull request to hub to fix it! Perhaps not using hub to do so, though.
- emacsfodder 11y agohub works just fine to create a PR, some lack of RTFM is at play.
- skj 11y agoSo, I never trust users to give me advice on features to add. But I always believe them when they say something is difficult or confusing. Research should not be required to make a good CLI do what you want, provided you understand what you want.
- Manishearth 11y agoMight like http://blog.codinghorror.com/listen-to-your-community-but-dont-let-them-tell-you-what-to-do/ http://blog.codinghorror.com/listen-to-your-community-but-do...
- michaelmior 11y agoI believe will always default to sending the PR to the remote named origin. If you have the original repo listed as origin and your repo as a remote with your username, you get the expected behaviour. I think the issue here is that hub has no explicit knowledge of the ancestry of the repo so unless it fetches this from the GH API, I think it's doing the only logical thing.
- mgold 11y agoIt sure would be nice to have `--dry-run --verbose` to see exactly what it's going to do.
- zimbatm 11y agoThanks to hub the friction to contributing is much lower for me. That's how I contribute back to projects on github: hub clone user/repo cd repo git checkout -b my-contrib # ... fix fix fix ... hub fork git push -u zimbatm my-contrib hub browse # Opens browser on my fork # Create PR with comment in browser
- jballanc 11y agoJust a note, you can simplify your workflow even further by using `hub pull-request` . If your PR consists of a single commit, it'll even pre-populate the PR description for you (if not, it helpfully lists the commits included in the PR in the comments of the PR/commit message).
- bderusha 11y agoIf you want to review the PR before submitting it you can also do `hub compare my-contrib` and it will open up the comparison in your browser. One more click to turn it into a PR.
- Dewie3 11y ago> hub is best aliased as git, so you can type `$ git <command>` in the shell and get all the usual hub features. World domination feels imminent.
- pvdebbe 11y agoYes, sure smells like a case of embrace & extend.
- chrismorgan 11y agoI know I don’t like doing it that way. I use `git` (actually, I have `alias g=git`, so I actually write `g`) directly for most things, only pulling out `hub` for GitHub-specific things.
- brento 11y agoI can see Linus Torvalds doing a table flip over this part. (╯°□°)╯︵ ┻━┻
- jrolfs 11y agoIn my experience it slows the `git` command down quite a bit and therefore my prompt. It's not too difficult to type hub instead :/
- bovermyer 11y agoI've been using Hub forever. It's a lovely bit of improvement over raw git, at least for Github-based projects.
- callahad 11y agoI'm quite fond of of Ingy's git-hub command, https://github.com/ingydotnet/git-hub https://github.com/ingydotnet/git-hub, which also gives you most of Hub's features, along with much, much more. E.g., the the ability to manage things like a repo's collaborators, issues, etc. from the command line. And it's a normal git extension command, so you run it as `git hub clone foo/bar` or `git hub issue-new` or `git hub pr-list` which feels like a better point of integration. Edit: And per some concerns elsewhere in the comments, there's also a --dryrun parameter to ensure that it's going to do what you want it to do. ;)
- bsiemon 11y agohub pull-request is my favorite feature. It cuts the actions down from many mouse clicks to one command in terminal.
- dotandimet 11y agoI ran across this repo yesterday while searching for an explanation of github releases (not a very searchable term...). The release notes for version 2.2.0 mention their [cucumber specs](https://github.com/github/hub/tree/master/features https://github.com/github/hub/tree/master/features), which look like a good example of using BDD in a full project. And then I wandered off and got distracted by a UTF-8 problem in the Hebrew localization of Test::BDD::Cucumber.
- kolev 11y agoNode GH [0] seems to do a few things better including the plugin architecture allowing integration with JIRA and others. [0] http://nodegh.io/ http://nodegh.io/