[Insight-developers] can't push to gerrit

David Cole david.cole at kitware.com
Tue Mar 1 16:33:08 EST 2011


After you have the new branch, containing the commit, it's safe to do:

git checkout master
git reset --hard origin/master

That will put your local master back to the same state as what's on origin,
and then your commit will "only" be on the topic branch.

Commits may be "reached" from many different branches with git.


On Tue, Mar 1, 2011 at 4:30 PM, Mark Roden <mmroden at gmail.com> wrote:

> Hi Marcus,
>
> git checkout -b my-topic is making a new branch, but the commit
> remains in the master branch.  Is this a git version thing, possibly?
>
> Mark
>
> On Tue, Mar 1, 2011 at 1:16 PM, Marcus D. Hanwell
> <marcus.hanwell at kitware.com> wrote:
> > If you are on your master, you can simply do a,
> >
> > git checkout -b my-topic
> >
> > That will give you a new topic branch with the commits from your local
> > master. At some point you will want to reset your local master,
> > warning - if you don't make a topic branch as described above you
> > could lose some commits.
> >
> > git checkout master
> > git reset --hard origin/master
> >
> > The wiki page for developers, http://www.itk.org/Wiki/ITK/Git/Develop
> > will give more details. If you are having trouble with the push then
> > you can test authentication using the SetupForDevelopment.sh script. A
> > quick 'ssh -v review.source.kitware.com' would test
> > authentication/firewall issues - it should print out a message telling
> > you how to clone if you authenticated.
> >
> > Hope that helps,
> >
> > Marcus
> >
> > On Tue, Mar 1, 2011 at 4:11 PM, Mark Roden <mmroden at gmail.com> wrote:
> >> Ah, so I have to be on a branch now to do this?
> >>
> >> That should probably be part of the hooks then, because I was able to
> >> do it from master before (and was doing it from master before).
> >>
> >> How can I move my commit from master to some other branch to do the
> checkin?
> >>
> >> On Tue, Mar 1, 2011 at 1:04 PM, David Cole <david.cole at kitware.com>
> wrote:
> >>> The HEAD:refs/for/master/MyCommitMessage is supposed to reference a
> >>> topic branch name...
> >>>
> >>> What is the name of your current branch?
> >>>
> >>> git branch
> >>>
> >>> (branch name with the * next to it is current...)
> >>>
> >>>
> >>>
> >>> On Tue, Mar 1, 2011 at 3:55 PM, David Cole <david.cole at kitware.com>
> wrote:
> >>>> Do you get the same result with the simpler?
> >>>>
> >>>>  git gerrit-push
> >>>>
> >>>>
> >>>> On Tue, Mar 1, 2011 at 3:52 PM, Mark Roden <mmroden at gmail.com> wrote:
> >>>>> Hi all,
> >>>>>
> >>>>> So I think I've solved some of the gdcm warnings, but can't push to
> >>>>> gerrit.  What's changed here?
> >>>>>
> >>>>> I've followed the ./Utilities/Setup etc script.
> >>>>>
> >>>>> I do
> >>>>> git commit -a -m "COMP: My Commit Message"
> >>>>> then
> >>>>> git push gerrit HEAD:refs/for/master/MyCommitMessage
> >>>>>
> >>>>> And nothing happens, the command line just freezes.  My id is set to
> >>>>> mmroden at gmail.com, and my ssh key is in gerrit, and I can log in to
> >>>>> the gerrit website.
> >>>>>
> >>>>> I was following the instructions here:
> >>>>> http://www.visualizationtoolkit.org/Wiki/ITK/Gerrit
> >>>>>
> >>>>> Please help,
> >>>>> Mark
> >>>>> _______________________________________________
> >>>>> Powered by www.kitware.com
> >>>>>
> >>>>> Visit other Kitware open-source projects at
> >>>>> http://www.kitware.com/opensource/opensource.html
> >>>>>
> >>>>> Kitware offers ITK Training Courses, for more information visit:
> >>>>> http://kitware.com/products/protraining.html
> >>>>>
> >>>>> Please keep messages on-topic and check the ITK FAQ at:
> >>>>> http://www.itk.org/Wiki/ITK_FAQ
> >>>>>
> >>>>> Follow this link to subscribe/unsubscribe:
> >>>>> http://www.itk.org/mailman/listinfo/insight-developers
> >>>>>
> >>>>
> >>>
> >> _______________________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> >> http://www.kitware.com/opensource/opensource.html
> >>
> >> Kitware offers ITK Training Courses, for more information visit:
> >> http://kitware.com/products/protraining.html
> >>
> >> Please keep messages on-topic and check the ITK FAQ at:
> >> http://www.itk.org/Wiki/ITK_FAQ
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> http://www.itk.org/mailman/listinfo/insight-developers
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110301/9fb3e4ca/attachment.htm>


More information about the Insight-developers mailing list