Re: Rebase and squash before merging PRs

2017-10-05 Thread Galen O'Sullivan
On Thu, Oct 5, 2017 at 3:14 PM, Jinmei Liao  wrote:

> Not sure if this is useful to everyone, but when I push a subsequent commit 
> to my feature branch, I always use "force push", so that it's only one commit 
> I need to rebase to develop.
>
>
I use force push when I've made small changes and don't have any big
reviews yet, but I generally prefer to keep the history in the PR until
merge so that myself and others can keep track of changesets, especially if
I want review again. I think it's largely personal preference.


Re: Rebase and squash before merging PRs

2017-10-05 Thread Dave Barnes
I like that idea - sounds comfortably similar to my pre-gitbox process.

On Thu, Oct 5, 2017 at 5:24 PM, Jacob Barrett  wrote:

> You can’t use the UI to just rebase. You would do that on your local repo
> and force push your branch. You could even take that time to squash
> yourself.
>
> Then the pull would show your new rebased commits for someone to approve
> and merge (squash too if they want).
>
> -Jake
>
>
> > On Oct 5, 2017, at 5:20 PM, Dave Barnes  wrote:
> >
> > Jake,
> > Say I have a PR with the original commit plus two more to incorporate
> > reviewer suggestions. How is it possible within the github UI to just
> > rebase without also merging? I don't see that choice in the gitbox
> pulldown
> > menu.
> >
> >> On Thu, Oct 5, 2017 at 4:59 PM, Jacob Barrett 
> wrote:
> >>
> >> If you want to preserve all commits use rebase and merge. If you want a
> >> single commit then use squash and merge, which rebases, squashes, and
> >> merges. Both options update the commit info with the person performing
> the
> >> merge.
> >>
> >> Personally though I think you should be asking contributors to rebase
> >> before you accept their pull so you know it has been vetted agains the
> >> latest develop changes. As committer you shouldn’t have to resolve a
> >> submitters trash. This makes merging safe too.
> >>
> >> -Jake
> >>
> >>
> >>> On Oct 5, 2017, at 4:32 PM, Nick Reich  wrote:
> >>>
> >>> Here are the docs from github:
> >>> https://help.github.com/articles/about-pull-request-merges/
> >>>
> >>> Based on those and using squash and commit for some of my merges, it
> >> looks
> >>> like it does what we want: just one commit for the merge of the feature
> >>> branch. Note that "rebase and merge" in github does not actually work
> >>> exactly like it does in git (see above link).
> >>>
>  On Thu, Oct 5, 2017 at 4:15 PM, Jared Stewart 
> >> wrote:
> 
>  Does anyone happen to know if “squash and merge” also does a rebase or
>  not? I’ve been hesitant to use that button since I’m not sure what
> exact
>  sequence of git commands it corresponds to.
> 
> > On Oct 5, 2017, at 3:59 PM, Jason Huynh  wrote:
> >
> > I think we can also use "squash and merge" if wanting to squash
> commits
> > before merging.  This would allow you not to have to force push every
>  time.
> >
> >> On Thu, Oct 5, 2017 at 3:15 PM Jinmei Liao 
> wrote:
> >>
> >> On the PR UI page, you can do that by pull down the the menu when
> you
>  are
> >> ready to merge. Remember to use "Rebase and merge".
> >>
> >>
> >> ​
> >>
> >> Not sure if this is useful to everyone, but when I push a subsequent
>  commit to my feature branch, I always use "force push", so that it's
> >> only
>  one commit I need to rebase to develop.
> >>
> >>
> >> On Thu, Oct 5, 2017 at 3:00 PM, Jared Stewart 
>  wrote:
> >>
> >>> I’ve been seeing a lot more merge commits on develop since we moved
> >> to
> >>> Gitbox.  Just wanted to give everyone a friendly reminder to please
>  rebase
> >>> before merging to keep our git history tidy and readable.
> >>>
> >>> Thanks,
> >>> Jared
> >>
> >>
> >>
> >>
> >> --
> >> Cheers
> >>
> >> Jinmei
> >>
> 
> 
> >>
>


Re: Rebase and squash before merging PRs

2017-10-05 Thread Jacob Barrett
You can’t use the UI to just rebase. You would do that on your local repo and 
force push your branch. You could even take that time to squash yourself. 

Then the pull would show your new rebased commits for someone to approve and 
merge (squash too if they want).

-Jake


> On Oct 5, 2017, at 5:20 PM, Dave Barnes  wrote:
> 
> Jake,
> Say I have a PR with the original commit plus two more to incorporate
> reviewer suggestions. How is it possible within the github UI to just
> rebase without also merging? I don't see that choice in the gitbox pulldown
> menu.
> 
>> On Thu, Oct 5, 2017 at 4:59 PM, Jacob Barrett  wrote:
>> 
>> If you want to preserve all commits use rebase and merge. If you want a
>> single commit then use squash and merge, which rebases, squashes, and
>> merges. Both options update the commit info with the person performing the
>> merge.
>> 
>> Personally though I think you should be asking contributors to rebase
>> before you accept their pull so you know it has been vetted agains the
>> latest develop changes. As committer you shouldn’t have to resolve a
>> submitters trash. This makes merging safe too.
>> 
>> -Jake
>> 
>> 
>>> On Oct 5, 2017, at 4:32 PM, Nick Reich  wrote:
>>> 
>>> Here are the docs from github:
>>> https://help.github.com/articles/about-pull-request-merges/
>>> 
>>> Based on those and using squash and commit for some of my merges, it
>> looks
>>> like it does what we want: just one commit for the merge of the feature
>>> branch. Note that "rebase and merge" in github does not actually work
>>> exactly like it does in git (see above link).
>>> 
 On Thu, Oct 5, 2017 at 4:15 PM, Jared Stewart 
>> wrote:
 
 Does anyone happen to know if “squash and merge” also does a rebase or
 not? I’ve been hesitant to use that button since I’m not sure what exact
 sequence of git commands it corresponds to.
 
> On Oct 5, 2017, at 3:59 PM, Jason Huynh  wrote:
> 
> I think we can also use "squash and merge" if wanting to squash commits
> before merging.  This would allow you not to have to force push every
 time.
> 
>> On Thu, Oct 5, 2017 at 3:15 PM Jinmei Liao  wrote:
>> 
>> On the PR UI page, you can do that by pull down the the menu when you
 are
>> ready to merge. Remember to use "Rebase and merge".
>> 
>> 
>> ​
>> 
>> Not sure if this is useful to everyone, but when I push a subsequent
 commit to my feature branch, I always use "force push", so that it's
>> only
 one commit I need to rebase to develop.
>> 
>> 
>> On Thu, Oct 5, 2017 at 3:00 PM, Jared Stewart 
 wrote:
>> 
>>> I’ve been seeing a lot more merge commits on develop since we moved
>> to
>>> Gitbox.  Just wanted to give everyone a friendly reminder to please
 rebase
>>> before merging to keep our git history tidy and readable.
>>> 
>>> Thanks,
>>> Jared
>> 
>> 
>> 
>> 
>> --
>> Cheers
>> 
>> Jinmei
>> 
 
 
>> 


Re: Rebase and squash before merging PRs

2017-10-05 Thread Dave Barnes
Jake,
Say I have a PR with the original commit plus two more to incorporate
reviewer suggestions. How is it possible within the github UI to just
rebase without also merging? I don't see that choice in the gitbox pulldown
menu.

On Thu, Oct 5, 2017 at 4:59 PM, Jacob Barrett  wrote:

> If you want to preserve all commits use rebase and merge. If you want a
> single commit then use squash and merge, which rebases, squashes, and
> merges. Both options update the commit info with the person performing the
> merge.
>
> Personally though I think you should be asking contributors to rebase
> before you accept their pull so you know it has been vetted agains the
> latest develop changes. As committer you shouldn’t have to resolve a
> submitters trash. This makes merging safe too.
>
> -Jake
>
>
> > On Oct 5, 2017, at 4:32 PM, Nick Reich  wrote:
> >
> > Here are the docs from github:
> > https://help.github.com/articles/about-pull-request-merges/
> >
> > Based on those and using squash and commit for some of my merges, it
> looks
> > like it does what we want: just one commit for the merge of the feature
> > branch. Note that "rebase and merge" in github does not actually work
> > exactly like it does in git (see above link).
> >
> >> On Thu, Oct 5, 2017 at 4:15 PM, Jared Stewart 
> wrote:
> >>
> >> Does anyone happen to know if “squash and merge” also does a rebase or
> >> not? I’ve been hesitant to use that button since I’m not sure what exact
> >> sequence of git commands it corresponds to.
> >>
> >>> On Oct 5, 2017, at 3:59 PM, Jason Huynh  wrote:
> >>>
> >>> I think we can also use "squash and merge" if wanting to squash commits
> >>> before merging.  This would allow you not to have to force push every
> >> time.
> >>>
>  On Thu, Oct 5, 2017 at 3:15 PM Jinmei Liao  wrote:
> 
>  On the PR UI page, you can do that by pull down the the menu when you
> >> are
>  ready to merge. Remember to use "Rebase and merge".
> 
> 
>  ​
> 
>  Not sure if this is useful to everyone, but when I push a subsequent
> >> commit to my feature branch, I always use "force push", so that it's
> only
> >> one commit I need to rebase to develop.
> 
> 
>  On Thu, Oct 5, 2017 at 3:00 PM, Jared Stewart 
> >> wrote:
> 
> > I’ve been seeing a lot more merge commits on develop since we moved
> to
> > Gitbox.  Just wanted to give everyone a friendly reminder to please
> >> rebase
> > before merging to keep our git history tidy and readable.
> >
> > Thanks,
> > Jared
> 
> 
> 
> 
>  --
>  Cheers
> 
>  Jinmei
> 
> >>
> >>
>


Re: Rebase and squash before merging PRs

2017-10-05 Thread Jacob Barrett
If you want to preserve all commits use rebase and merge. If you want a single 
commit then use squash and merge, which rebases, squashes, and merges. Both 
options update the commit info with the person performing the merge. 

Personally though I think you should be asking contributors to rebase before 
you accept their pull so you know it has been vetted agains the latest develop 
changes. As committer you shouldn’t have to resolve a submitters trash. This 
makes merging safe too.

-Jake


> On Oct 5, 2017, at 4:32 PM, Nick Reich  wrote:
> 
> Here are the docs from github:
> https://help.github.com/articles/about-pull-request-merges/
> 
> Based on those and using squash and commit for some of my merges, it looks
> like it does what we want: just one commit for the merge of the feature
> branch. Note that "rebase and merge" in github does not actually work
> exactly like it does in git (see above link).
> 
>> On Thu, Oct 5, 2017 at 4:15 PM, Jared Stewart  wrote:
>> 
>> Does anyone happen to know if “squash and merge” also does a rebase or
>> not? I’ve been hesitant to use that button since I’m not sure what exact
>> sequence of git commands it corresponds to.
>> 
>>> On Oct 5, 2017, at 3:59 PM, Jason Huynh  wrote:
>>> 
>>> I think we can also use "squash and merge" if wanting to squash commits
>>> before merging.  This would allow you not to have to force push every
>> time.
>>> 
 On Thu, Oct 5, 2017 at 3:15 PM Jinmei Liao  wrote:
 
 On the PR UI page, you can do that by pull down the the menu when you
>> are
 ready to merge. Remember to use "Rebase and merge".
 
 
 ​
 
 Not sure if this is useful to everyone, but when I push a subsequent
>> commit to my feature branch, I always use "force push", so that it's only
>> one commit I need to rebase to develop.
 
 
 On Thu, Oct 5, 2017 at 3:00 PM, Jared Stewart 
>> wrote:
 
> I’ve been seeing a lot more merge commits on develop since we moved to
> Gitbox.  Just wanted to give everyone a friendly reminder to please
>> rebase
> before merging to keep our git history tidy and readable.
> 
> Thanks,
> Jared
 
 
 
 
 --
 Cheers
 
 Jinmei
 
>> 
>> 


Re: Rebase and squash before merging PRs

2017-10-05 Thread Nick Reich
Here are the docs from github:
https://help.github.com/articles/about-pull-request-merges/

Based on those and using squash and commit for some of my merges, it looks
like it does what we want: just one commit for the merge of the feature
branch. Note that "rebase and merge" in github does not actually work
exactly like it does in git (see above link).

On Thu, Oct 5, 2017 at 4:15 PM, Jared Stewart  wrote:

> Does anyone happen to know if “squash and merge” also does a rebase or
> not? I’ve been hesitant to use that button since I’m not sure what exact
> sequence of git commands it corresponds to.
>
> > On Oct 5, 2017, at 3:59 PM, Jason Huynh  wrote:
> >
> > I think we can also use "squash and merge" if wanting to squash commits
> > before merging.  This would allow you not to have to force push every
> time.
> >
> > On Thu, Oct 5, 2017 at 3:15 PM Jinmei Liao  wrote:
> >
> >> On the PR UI page, you can do that by pull down the the menu when you
> are
> >> ready to merge. Remember to use "Rebase and merge".
> >>
> >>
> >> ​
> >>
> >> Not sure if this is useful to everyone, but when I push a subsequent
> commit to my feature branch, I always use "force push", so that it's only
> one commit I need to rebase to develop.
> >>
> >>
> >> On Thu, Oct 5, 2017 at 3:00 PM, Jared Stewart 
> wrote:
> >>
> >>> I’ve been seeing a lot more merge commits on develop since we moved to
> >>> Gitbox.  Just wanted to give everyone a friendly reminder to please
> rebase
> >>> before merging to keep our git history tidy and readable.
> >>>
> >>> Thanks,
> >>> Jared
> >>
> >>
> >>
> >>
> >> --
> >> Cheers
> >>
> >> Jinmei
> >>
>
>


Re: Rebase and squash before merging PRs

2017-10-05 Thread Jared Stewart
Does anyone happen to know if “squash and merge” also does a rebase or not? 
I’ve been hesitant to use that button since I’m not sure what exact sequence of 
git commands it corresponds to.

> On Oct 5, 2017, at 3:59 PM, Jason Huynh  wrote:
> 
> I think we can also use "squash and merge" if wanting to squash commits
> before merging.  This would allow you not to have to force push every time.
> 
> On Thu, Oct 5, 2017 at 3:15 PM Jinmei Liao  wrote:
> 
>> On the PR UI page, you can do that by pull down the the menu when you are
>> ready to merge. Remember to use "Rebase and merge".
>> 
>> 
>> ​
>> 
>> Not sure if this is useful to everyone, but when I push a subsequent commit 
>> to my feature branch, I always use "force push", so that it's only one 
>> commit I need to rebase to develop.
>> 
>> 
>> On Thu, Oct 5, 2017 at 3:00 PM, Jared Stewart  wrote:
>> 
>>> I’ve been seeing a lot more merge commits on develop since we moved to
>>> Gitbox.  Just wanted to give everyone a friendly reminder to please rebase
>>> before merging to keep our git history tidy and readable.
>>> 
>>> Thanks,
>>> Jared
>> 
>> 
>> 
>> 
>> --
>> Cheers
>> 
>> Jinmei
>> 



Re: Rebase and squash before merging PRs

2017-10-05 Thread Jason Huynh
I think we can also use "squash and merge" if wanting to squash commits
before merging.  This would allow you not to have to force push every time.

On Thu, Oct 5, 2017 at 3:15 PM Jinmei Liao  wrote:

> On the PR UI page, you can do that by pull down the the menu when you are
> ready to merge. Remember to use "Rebase and merge".
>
>
> ​
>
> Not sure if this is useful to everyone, but when I push a subsequent commit 
> to my feature branch, I always use "force push", so that it's only one commit 
> I need to rebase to develop.
>
>
> On Thu, Oct 5, 2017 at 3:00 PM, Jared Stewart  wrote:
>
>> I’ve been seeing a lot more merge commits on develop since we moved to
>> Gitbox.  Just wanted to give everyone a friendly reminder to please rebase
>> before merging to keep our git history tidy and readable.
>>
>> Thanks,
>> Jared
>
>
>
>
> --
> Cheers
>
> Jinmei
>


Re: Rebase and squash before merging PRs

2017-10-05 Thread Jinmei Liao
On the PR UI page, you can do that by pull down the the menu when you are
ready to merge. Remember to use "Rebase and merge".


​

Not sure if this is useful to everyone, but when I push a subsequent
commit to my feature branch, I always use "force push", so that it's
only one commit I need to rebase to develop.


On Thu, Oct 5, 2017 at 3:00 PM, Jared Stewart  wrote:

> I’ve been seeing a lot more merge commits on develop since we moved to
> Gitbox.  Just wanted to give everyone a friendly reminder to please rebase
> before merging to keep our git history tidy and readable.
>
> Thanks,
> Jared




-- 
Cheers

Jinmei


Re: Rebase and squash before merging PRs

2017-10-05 Thread Mark Bretl
One helpful Git configuration I use which can help reduce merge commits is
to set the default action to rebase when doing a pull. To set this a global
configuration default on your system, do the following command:

git config --global pull.rebase true

--Mark

On Thu, Oct 5, 2017 at 3:00 PM, Jared Stewart  wrote:

> I’ve been seeing a lot more merge commits on develop since we moved to
> Gitbox.  Just wanted to give everyone a friendly reminder to please rebase
> before merging to keep our git history tidy and readable.
>
> Thanks,
> Jared


Rebase and squash before merging PRs

2017-10-05 Thread Jared Stewart
I’ve been seeing a lot more merge commits on develop since we moved to Gitbox.  
Just wanted to give everyone a friendly reminder to please rebase before 
merging to keep our git history tidy and readable.

Thanks,
Jared