[Insight-developers] Gerrit: Failed to push (no new changes)
Marcus D. Hanwell
marcus.hanwell at kitware.com
Mon Oct 18 14:08:31 EDT 2010
Sorry, lunch and then a meeting...if you delete a file directly it
will show up as deleted locally. You then have to run 'git rm file1
file2' etc to actually stage the deletion locally. You can then commit
that and you will see that the files are deleted. If git status shows
you added or deleted files it means that those changes have not been
committed yet.
I am guessing you saw in status that they were deleted, but had not
committed that. 'git commit -a' commits all local changes, it is
usually preferable to add the things you mean to commit, but I use
this command switch too at times.
Marcus
On Mon, Oct 18, 2010 at 11:54 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> I started over. I blew away my changes, and the branch. Recreated the branch.
>
> This time I did a git rm on the files, edited the CMakeLists.txt file.
> Then I did
> git commit -a
>
> Then the push worked.
>
> I have no idea what is going on, but at least I got it pushed.
>
> Bill
>
> On Mon, Oct 18, 2010 at 11:35 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> OK, I just tried to make a trivial change to a file and push again.
>> This time it accepted the push, but I don't see my deleted files in
>> the patch.
>>
>> Bill
>>
>> On Mon, Oct 18, 2010 at 11:02 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>>> I think the problem is that when I first pushed it, I had uncommitted
>>> deleted files. I guess the push includes those uncommitted files? Once
>>> I commit them and try to push again, it does not recognize that the
>>> removed files have been commited.
>>>
>>>
>>>
>>> On Mon, Oct 18, 2010 at 10:54 AM, Marcus D. Hanwell
>>> <marcus.hanwell at kitware.com> wrote:
>>>> On Mon, Oct 18, 2010 at 10:46 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>>>>> Marcus,
>>>>>
>>>>> I created a topic branch, edited some files and removed some files. I
>>>>> committed my changes and pushed to gerrit.
>>>>>
>>>>> I noticed that my gerrit patch did not have the removed files. I guess
>>>>> I had forgotten to commit them.
>>>>>
>>>>> So, I abandoned that patch.
>>>>>
>>>>> Then I committed the removed files and renamed the branch and tried to
>>>>> push to gerrit.
>>>>>
>>>>> I get this error:
>>>>> $ git gerrit-push
>>>>> Counting objects: 9, done.
>>>>> Delta compression using up to 2 threads.
>>>>> Compressing objects: 100% (5/5), done.
>>>>> Writing objects: 100% (5/5), 712 bytes, done.
>>>>> Total 5 (delta 4), reused 0 (delta 0)
>>>>> To lorensen at review.source.kitware.com:ITK
>>>>> ! [remote rejected] HEAD ->
>>>>> refs/for/master/RemoveOrientedImageExamples2 (no new changes)
>>>>> error: failed to push some refs to 'lorensen at review.source.kitware.com:ITK'
>>>>>
>>>>> But there are new changes. The second try has the removed files committed.
>>>>>
>>>>> Help
>>>>>
>>>> What does,
>>>>
>>>> git log --graph --stat origin/master..
>>>>
>>>> show? Gerrit is saying that it cannot see anything that is not already
>>>> either in master or up for review. If you paste the output of that
>>>> command I can look into what might be causing this.
>>>>
>>>> Thanks,
>>>>
>>>> Marcus
>>>>
>>>
>>
>
More information about the Insight-developers
mailing list