[vtk-developers] Git Merge commit declined

Bill Lorensen bill.lorensen at gmail.com
Sun Aug 22 15:49:02 EDT 2010


I guess I need more insight into this. I'll study some more.

On Sun, Aug 22, 2010 at 3:44 PM, Marcus D. Hanwell
<marcus.hanwell at kitware.com> wrote:
> If you compare the two approaches it does not save you very much,
> On Sun, Aug 22, 2010 at 3:28 PM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
>>
>> To avoid unnecessary bureaucracy,  I think there are times one should
>> not have to go through the the topic stage. Have we adopted branchy
>> workflow? ITK has not yet done so.
>>
>> For example, it I want to fix a bug I might as suggested here:
>> http://www.itk.org/Wiki/ITKContribute
>>
>> 1. git fetch origin
>> 2. git checkout master
>> 3. git branch BUG0011074
>> 4. git checkout BUG0011074
>> 5.      vim CMakeLists.txt   # Edit to change the version number
>> 6. git add CMakeLists.txt
>> 7. git commit
>> 8. git checkout master
>> 9. git merge BUG0011074
>> 10. git push origin
>> 11. git branch -d BUG0011074
>>
> 8. git push stage HEAD
> 9. ssh git at vtk.org stage VTK merge BUG0011074
> 10. git checkout master
> 11. git pull
> 12. git branch -d BUG0011074
> For Titan, there is a git alias I created that can automate more of this.
> You can also condense the earlier lines,
> 1. git fetch origin
> 2. git checkout checkout -b BUG0011074 origin/master
> skip through to step 5.
> The stage allows us to control the types of merge commits people can make,
> preventing the accidental merge commits like the one you made from being
> pushed into VTK's history.
> Thanks,
> Marcus
>>
>> On Sun, Aug 22, 2010 at 3:22 PM, Marcus D. Hanwell
>> <marcus.hanwell at kitware.com> wrote:
>> > On Sun, Aug 22, 2010 at 3:15 PM, Bill Lorensen <bill.lorensen at gmail.com>
>> > wrote:
>> >>
>> >> So how do I modify my workflow. Here is what I did
>> >>
>> >> git checkout TestHarness
>> >>  edited a bunch of files
>> >>  compiled and tested my changes
>> >>  added and committed
>> >
>> > The following bits should change,
>> > (see http://www.vtk.org/Wiki/Git/Workflow/Stage)
>> >
>> >>
>> >> git checkout master
>> >> git merge TestHarness
>> >> git pull
>> >> git push
>> >
>> > One time only,
>> > git remote add git at vtk.org:stage/VTK.git
>> > Then, you would do a (from your topic branch),
>> > git push stage HEAD
>> > ssh git at vtk.org stage VTK merge TestHarness
>> > Where TestHarness is the name of your topic branch. You can also issue,
>> > ssh git at vtk.org stage VTK print
>> > To see a list of staged topic that are not yet fully merged. This is
>> > part
>> > one of the move to the branchy workflow - actually allowing topic
>> > branches
>> > to be merged into master. Right now we are allowing both the CVS-like
>> > linear
>> > workflow (push straight to VTK), or branch (using the stage).
>> > I hope that makes things clearer.
>> > Thanks,
>> > Marcus
>> >>
>> >>
>> >> On Sun, Aug 22, 2010 at 3:09 PM, Marcus D. Hanwell
>> >> <marcus.hanwell at kitware.com> wrote:
>> >> > On Sun, Aug 22, 2010 at 3:05 PM, Bill Lorensen
>> >> > <bill.lorensen at gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> I tried to push some changes to master. Here is what happened...
>> >> >> [lorensen at localhost VTK]$ git push
>> >> >> Counting objects: 32, done.
>> >> >> Delta compression using up to 2 threads.
>> >> >> Compressing objects: 100% (19/19), done.
>> >> >> Writing objects: 100% (19/19), 2.10 KiB, done.
>> >> >> Total 19 (delta 14), reused 0 (delta 0)
>> >> >>
>> >> >> ----------------------------------------------------------------------
>> >> >> merge commit 06c3f787 not allowed
>> >> >>
>> >> >> ----------------------------------------------------------------------
>> >> >> error: hook declined to update refs/heads/master
>> >> >> To git at vtk.org:VTK.git
>> >> >>  ! [remote rejected] master -> master (hook declined)
>> >> >> error: failed to push some refs to 'git at vtk.org:VTK.git'
>> >> >>
>> >> > When pushing directly to VTK, no merge commits are allowed. You
>> >> > probably
>> >> > did
>> >> > a git pull and created a merge with the remote master, you can tell
>> >> > by
>> >> > issuing,
>> >> > git log --graph --stat origin/master..
>> >> > In all likelihood, you can fix it by simply issuing,
>> >> > git pull --rebase origin/master
>> >> > We do have a topic stage that allows merge commits. If you get stuck,
>> >> > you
>> >> > can always push your topic and let me take a look at it for you.
>> >> > Thanks,
>> >> > Marcus
>> >
>> >
>
>



More information about the vtk-developers mailing list