Re: hub github helper
On Thu, Aug 4, 2016 at 3:16 AM, John Meinelwrote: > So my "upstream" is github.com/juju/juju but my "origin" is > github.com/jameinel/juju. I would be concerned to set the former as an > origin because as a lead I *do* have the ability to push to the master > branch. I really don't want to do that by accident. > > Is there a configuration I can do differently? > You can set the upstream push URL to something fake like nopush. Better yet use the read-only git url for the remote. i.e. git://github.com/... rather than the read-write one, g...@github.com/... Either would help prevent accidental writes to upstream. -- Reed O'Brien ✉ reed.obr...@canonical.com ✆ 415-562-6797 -- Juju-dev mailing list Juju-dev@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
Re: hub github helper
FWIW, I add a line to my repo config. The second line (or first fetch) below: [remote "upstream"] url = https://github.com/juju/juju fetch = +refs/pull/*/head:refs/remotes/upstream/pr/* fetch = +refs/heads/*:refs/remotes/upstream/* `git fetch` subsequently fetches all PRs. and checking one out becomes: git co pr/5876 Branch pr/5876 set up to track remote ref refs/pull/5876/head. Switched to a new branch 'pr/5876' The order of fetches in the config is important, from more specific ( refs/remotes/upstream/pr/*) to less specific (refs/remotes/upstream/*). Inverting them will cause clobber induced churn when fetching, IIRC. On Thu, Aug 4, 2016 at 4:59 AM, Chris MacNaughton < chris.macnaugh...@canonical.com> wrote: > > That is interesting, I use the same configuration: origin is me, upstream > is the parent fork. I didn't realize this was uncommon. > > According to Github, this is the normal, expected practice: > https://help.github.com/articles/fork-a-repo/#keep-your-fork-synced > > -- > Juju-dev mailing list > Juju-dev@lists.ubuntu.com > Modify settings or unsubscribe at: https://lists.ubuntu.com/ > mailman/listinfo/juju-dev > > -- Reed O'Brien ✉ reed.obr...@canonical.com ✆ 415-562-6797 -- Juju-dev mailing list Juju-dev@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
Re: hub github helper
That is interesting, I use the same configuration: origin is me, upstream is the parent fork. I didn't realize this was uncommon. According to Github, this is the normal, expected practice: https://help.github.com/articles/fork-a-repo/#keep-your-fork-synced -- Juju-dev mailing list Juju-dev@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
Re: hub github helper
On Thu, Aug 4, 2016 at 6:16 AM John Meinelwrote: > On Aug 2, 2016 6:08 PM, "Nate Finch" wrote: > > > > > > > > To make a PR from the CLI using hub, make sure the repo you want to PR > against is the git remote called origin, then you can make a PR with your > current branch by just doing > > > > hub pull-request > > > > This will open an editor to write the PR message, or you can use -m just > like with git commit. > > > > -Nate > > > > So my "upstream" is github.com/juju/juju but my "origin" is > github.com/jameinel/juju. I would be concerned to set the former as an > origin because as a lead I *do* have the ability to push to the master > branch. I really don't want to do that by accident. > That is interesting, I use the same configuration: origin is me, upstream is the parent fork. I didn't realize this was uncommon. -- Juju-dev mailing list Juju-dev@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
Re: hub github helper
On Aug 2, 2016 6:08 PM, "Nate Finch"wrote: > > > > To make a PR from the CLI using hub, make sure the repo you want to PR against is the git remote called origin, then you can make a PR with your current branch by just doing > > hub pull-request > > This will open an editor to write the PR message, or you can use -m just like with git commit. > > -Nate > So my "upstream" is github.com/juju/juju but my "origin" is github.com/jameinel/juju. I would be concerned to set the former as an origin because as a lead I *do* have the ability to push to the master branch. I really don't want to do that by accident. Is there a configuration I can do differently? I would think github would recognize a "this is where I publish my branches" separately from "this is where I integrate them". I thought that was origin vs upstream. John =:-> -- Juju-dev mailing list Juju-dev@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
Re: hub github helper
+1 I've been using hub for a while now to make it easy to grab other people's pull requests. It's great. Like Nate, I also prefer to keep hub separate from git so I also ignore the install suggestion from the hub team. On 3 August 2016 at 07:56, Rick Hardingwrote: > Thanks Nate, that's really useful info and Hub makes it easy to get at > other folk's repos/forks of Juju to really collaborate, look at code that's > WIP and such. > > I highly recommend folks take a peek and see how it can improve their > collaboration and workflows. Especially when reviewing and QA'ing pull > requests from folks. > > On Tue, Aug 2, 2016 at 12:08 PM Nate Finch > wrote: > >> I've mentioned this before, but with some of our new code review >> guidelines, I figured it's good to reiterate. Github has a CLI tool that >> helps with doing git-related things with github. It's called hub. It's >> written in Go, so installing it is as easy as go get >> github.com/github/hub >> >> Github recommends making an alias to have hub replace git, since it >> forwards everything to git that it doesn't understand. Honestly, I don't >> really see any benefit to that. I prefer to understand what git is doing >> versus what hub is doing. >> >> It can do a whole bunch of stuff, but there are two things I use it for >> the most - checking out PRs and making PRs. >> >> Since we're supposed to be doing manual testing on people's PRs when we >> review them, we need a way to do that. With hub it's one command: >> >> hub checkout >> >> so, for example: >> >> hub checkout https://github.com/juju/juju/pull/5915 >> >> Bam, your local branch is set to a copy of the PR (don't forget to run >> godeps). >> >> To make a PR from the CLI using hub, make sure the repo you want to PR >> against is the git remote called origin, then you can make a PR with your >> current branch by just doing >> >> hub pull-request >> >> This will open an editor to write the PR message, or you can use -m just >> like with git commit. >> >> -Nate >> -- >> Juju-dev mailing list >> Juju-dev@lists.ubuntu.com >> Modify settings or unsubscribe at: >> https://lists.ubuntu.com/mailman/listinfo/juju-dev >> > > -- > Juju-dev mailing list > Juju-dev@lists.ubuntu.com > Modify settings or unsubscribe at: > https://lists.ubuntu.com/mailman/listinfo/juju-dev > > -- Juju-dev mailing list Juju-dev@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
Re: hub github helper
Thanks Nate, that's really useful info and Hub makes it easy to get at other folk's repos/forks of Juju to really collaborate, look at code that's WIP and such. I highly recommend folks take a peek and see how it can improve their collaboration and workflows. Especially when reviewing and QA'ing pull requests from folks. On Tue, Aug 2, 2016 at 12:08 PM Nate Finchwrote: > I've mentioned this before, but with some of our new code review > guidelines, I figured it's good to reiterate. Github has a CLI tool that > helps with doing git-related things with github. It's called hub. It's > written in Go, so installing it is as easy as go get github.com/github/hub > > Github recommends making an alias to have hub replace git, since it > forwards everything to git that it doesn't understand. Honestly, I don't > really see any benefit to that. I prefer to understand what git is doing > versus what hub is doing. > > It can do a whole bunch of stuff, but there are two things I use it for > the most - checking out PRs and making PRs. > > Since we're supposed to be doing manual testing on people's PRs when we > review them, we need a way to do that. With hub it's one command: > > hub checkout > > so, for example: > > hub checkout https://github.com/juju/juju/pull/5915 > > Bam, your local branch is set to a copy of the PR (don't forget to run > godeps). > > To make a PR from the CLI using hub, make sure the repo you want to PR > against is the git remote called origin, then you can make a PR with your > current branch by just doing > > hub pull-request > > This will open an editor to write the PR message, or you can use -m just > like with git commit. > > -Nate > -- > Juju-dev mailing list > Juju-dev@lists.ubuntu.com > Modify settings or unsubscribe at: > https://lists.ubuntu.com/mailman/listinfo/juju-dev > -- Juju-dev mailing list Juju-dev@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev