[Building Sakai] [sakai-core-team] Question about Pull requests

Steve Swinsburg steve.swinsburg at gmail.com
Tue Feb 10 01:24:00 PST 2015


I'm not a fan of squashing commits. We didn't do it in subversion and it
can break things majorly if you choose the wrong commit, which is easy to
do. Many gui clients don't fully support it either. IMO it is unnecessary.

What you did was fine, the commit in your branch updated the pr
automatically,  then it was merged in the pr. A pr is just a link between
the commits in a branch and the base.

Cheers,
Steve

sent from my mobile device
On 10/02/2015 7:19 AM, "Noah Botimer" <botimer at umich.edu> wrote:

> It's worth mentioning: any time you are planning to use --force,
> double-check your work. You could probably recover from a mistake, but it
> can be a lot of work.
>
> Since we are recommending that feature branches are rebased to include
> updates, it is good to get in the habit of being explicit. That is, include
> the remote name and branch name as a safety check, and try once before
> forcing. The various versions of the git clients have different defaults,
> you may not have your complete config on whatever machine you're currently
> using, or remote tracking might not be what you assumed for a particular
> branch.
>
> Use this:
>
> git push remote branch-name
>  ### Look at the big, nasty error message about divergent branches
>  ### Make sure this force is really what you want
> git push origin branch-name --force
>
> Instead of:
>
> git push --force
>
> The latter will cost you karma points and major fixup time eventually,
> dwarfing the few seconds of typing you saved with the short form.
>
> Thanks,
> -Noah
>
> On Feb 9, 2015, at 2:55 PM, Brian Jones wrote:
>
> > Hey Neal,
> >
> >> I made a pull request off a branch from my clone of Sakai project and
> >> then had a suggestion to change my pull request. I made the update in
> >> my branch and Git (or Github) seems to have automatically squashed my
> >> commits together in the one pull request, which is a good thing.
> >
> > Not quite. It's automatically updated the PR, but you've made several
> > commits (3 in total), that should be squashed into 1. You can refer to
> > step 6c in  https://confluence.sakaiproject.org/display/SAKDEV/Git+Setup
> > to walk you through squashing commits.
> >
> >> I don't need to merge my change back into my clone of Sakai project,
> >> just after the PR is merged, I can switch my local branch back to
> >> origin and git pull upstream master, and then I'm all synche'd up and
> >> all is good?
> >
> > Correct, after the PR is merged, you can just switch back to your master
> > branch and do the git pull upstream master && git push origin master to
> > both update your fork on your local machine and your fork in github.
> >
> > Hope this helps :)
> >
> > Brian Jones
> > Programmer/Analyst
> > Information Technology Services
> > Support Services Building, Suite 4300
> > Western University
> > (519) 661-2111 x86969
> > bjones86 at uwo.ca
> > _______________________________________________
> > sakai-core-team mailing list
> > sakai-core-team at collab.sakaiproject.org
> > http://collab.sakaiproject.org/mailman/listinfo/sakai-core-team
>
> _______________________________________________
> sakai-core-team mailing list
> sakai-core-team at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-core-team
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20150210/372f2d37/attachment.html 


More information about the sakai-dev mailing list