threads / discuss / 16594

git rebase --continue with goofy error

Subject: git rebase --continue with goofy error

## tl;dr

6 messages between Dec 4, 2008 and Dec 4, 2008.

replies: 5people: 4as markdown or json

Adrian Klingel· Dec 4, 2008, 14:55 UTC · lore
I am trying so, so hard to rebase a branch with updates made in master:

********* git rebase master *********

I get about 20 conflicts back, which I fix and do:

********* git add * *********

There were also many, many error messages after the rebase command, eg:

********* error: test/unit/missing_year_test.rb: already exists in index error: test/unit/axle_test.rb: already exists in index error: test/unit/body_style_test.rb: already exists in index error: test/unit/brake_test.rb: already exists in index error: test/unit/category_test.rb: already exists in index error: test/unit/comment_test.rb: already exists in index error: test/unit/company_comment_test.rb: does not exist in index error: test/unit/country_test.rb: already exists in index *********

but I ignore that error, because I have no idea what it means. If I were to guess, I'd say it's trying to copy files from master to my current branch. Of course.

So now I have added my conflict fixes, per the message:

********* Failed to merge in the changes. Patch failed at 0002.

When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branch and stop rebasing run "git rebase -- abort". *********

So I decide to continue:

********* git rebase --continue *********

And I get the following:
*********
mymac:/Library/mydir/code/myapp me$ git rebase --continue
Unknown option: 1
Usage: head [-options] <url>...
     -m <method>   use method for the request (default is 'HEAD')
     -f            make request even if head believes method is illegal
     -b <base>     Use the specified URL as base
     -t <timeout>  Set timeout value
     -i <time>     Set the If-Modified-Since header on the request
     -c <conttype> use this content-type for POST, PUT, CHECKIN
     -a            Use text mode for content I/O
     -p <proxyurl> use this as a proxy
     -P            don't load proxy settings from environment
     -H <header>   send this HTTP header (you can specify several)
     -u            Display method and URL before any response
     -U            Display request headers (implies -u)
     -s            Display response status code
     -S            Display response status chain
     -e            Display response headers
     -d            Do not display content
     -o <format>   Process HTML content in various ways
     -v            Show program version
     -h            Print this message
     -x            Extra debugging output
Applying
You still have unmerged paths in your index
did you forget to use 'git add'?

When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branch and stop rebasing run "git rebase -- abort".

*********

A google search of "git" and "Unknown option: 1" yields zero results. Notice I did not commit the adds. I didn't think it made sense to do that, since I imagine that is what the rebase is doing anyway?

This is on git version 1.5.5.3.
Should I upgrade git?  Will that break any repos that I have?
Thanks very, very much.
Björn Steinbrink· Dec 4, 2008, 16:27 UTC · re: Adrian Klingel · lore

Re: git rebase --continue with goofy error

On 2008.12.04 09:55:55 -0500, Adrian Klingel wrote:
Show 29 quoted lines
> And I get the following:
>
> *********
> mymac:/Library/mydir/code/myapp me$ git rebase --continue
> Unknown option: 1
> Usage: head [-options] <url>...
>     -m <method>   use method for the request (default is 'HEAD')
>     -f            make request even if head believes method is illegal
>     -b <base>     Use the specified URL as base
>     -t <timeout>  Set timeout value
>     -i <time>     Set the If-Modified-Since header on the request
>     -c <conttype> use this content-type for POST, PUT, CHECKIN
>     -a            Use text mode for content I/O
>     -p <proxyurl> use this as a proxy
>     -P            don't load proxy settings from environment
>     -H <header>   send this HTTP header (you can specify several)
>
>     -u            Display method and URL before any response
>     -U            Display request headers (implies -u)
>     -s            Display response status code
>     -S            Display response status chain
>     -e            Display response headers
>     -d            Do not display content
>     -o <format>   Process HTML content in various ways
>
>     -v            Show program version
>     -h            Print this message
>
>     -x            Extra debugging output

That comes via git-am which used to call "head -1", but using -<n> is deprecated and apparently not supported anymore by modern versions of coreutils. Was fixed in:

1d9b2656: git-am: head -1 is obsolete and doesn't work on some new systems
Which is in git 1.5.6.
Björn
Michael J Gruber· Dec 4, 2008, 16:32 UTC · re: Adrian Klingel · lore

Re: git rebase --continue with goofy error

Adrian Klingel venit, vidit, dixit 04.12.2008 15:55:
Show 27 quoted lines
> I am trying so, so hard to rebase a branch with updates made in master:
> 
> *********
> git rebase master
> *********
> 
> I get about 20 conflicts back, which I fix and do:
> 
> *********
> git add *
> *********
> 
> There were also many, many error messages after the rebase command, eg:
> 
> *********
> error: test/unit/missing_year_test.rb: already exists in index
> error: test/unit/axle_test.rb: already exists in index
> error: test/unit/body_style_test.rb: already exists in index
> error: test/unit/brake_test.rb: already exists in index
> error: test/unit/category_test.rb: already exists in index
> error: test/unit/comment_test.rb: already exists in index
> error: test/unit/company_comment_test.rb: does not exist in index
> error: test/unit/country_test.rb: already exists in index
> *********
> 
> 
> but I ignore that error, because I have no idea what it means.  If I  

Not a good general approach. If there are errors to begin with there is no reason to expect success later on.

Here, I assume you are starting from a dirty working tree. What did git status say before the rebase?

Show 14 quoted lines
> were to guess, I'd say it's trying to copy files from master to my  
> current branch.  Of course.
> 
> So now I have added my conflict fixes, per the message:
> 
> *********
> Failed to merge in the changes.
> Patch failed at 0002.
> 
> When you have resolved this problem run "git rebase --continue".
> If you would prefer to skip this patch, instead run "git rebase --skip".
> To restore the original branch and stop rebasing run "git rebase -- 
> abort".
> *********

What command triggered that message? It's certainly not saying that you have added your conflict fixes, as you seem to think.

Show 51 quoted lines
> 
> So I decide to continue:
> 
> *********
> git rebase --continue
> *********
> 
> 
> And I get the following:
> 
> *********
> mymac:/Library/mydir/code/myapp me$ git rebase --continue
> Unknown option: 1
> Usage: head [-options] <url>...
>      -m <method>   use method for the request (default is 'HEAD')
>      -f            make request even if head believes method is illegal
>      -b <base>     Use the specified URL as base
>      -t <timeout>  Set timeout value
>      -i <time>     Set the If-Modified-Since header on the request
>      -c <conttype> use this content-type for POST, PUT, CHECKIN
>      -a            Use text mode for content I/O
>      -p <proxyurl> use this as a proxy
>      -P            don't load proxy settings from environment
>      -H <header>   send this HTTP header (you can specify several)
> 
>      -u            Display method and URL before any response
>      -U            Display request headers (implies -u)
>      -s            Display response status code
>      -S            Display response status chain
>      -e            Display response headers
>      -d            Do not display content
>      -o <format>   Process HTML content in various ways
> 
>      -v            Show program version
>      -h            Print this message
> 
>      -x            Extra debugging output
> Applying
> You still have unmerged paths in your index
> did you forget to use 'git add'?
> 
> When you have resolved this problem run "git rebase --continue".
> If you would prefer to skip this patch, instead run "git rebase --skip".
> To restore the original branch and stop rebasing run "git rebase -- 
> abort".
> 
> *********
> 
> 
> A google search of "git" and "Unknown option: 1" yields zero  
> results. 

As the "Usage: head..." tells us, the message comes from the command "head", not from git. (head is used by git-rebase -i)

Show 7 quoted lines
> Notice I did not commit the adds.  I didn't think it made  
> sense to do that, since I imagine that is what the rebase is doing  
> anyway?
> 
> This is on git version 1.5.5.3.
> 
> Should I upgrade git?  Will that break any repos that I have?
Yes! No!

Cheers, Michael

Adrian Klingel· Dec 4, 2008, 16:40 UTC · re: Michael J Gruber · lore

Re: git rebase --continue with goofy error

Thanks alot Michael, Scott, and Bjorn.  I will upgrade git.

I found out why my "git rebase --continue" was failing. Do I need to explicitly add the .dotest directory and contents after each rebase failure?

Adrian
On Dec 4, 2008, at 11:32 AM, Michael J Gruber wrote:
Show 133 quoted lines
> Adrian Klingel venit, vidit, dixit 04.12.2008 15:55:
>> I am trying so, so hard to rebase a branch with updates made in  
>> master:
>>
>> *********
>> git rebase master
>> *********
>>
>> I get about 20 conflicts back, which I fix and do:
>>
>> *********
>> git add *
>> *********
>>
>> There were also many, many error messages after the rebase  
>> command, eg:
>>
>> *********
>> error: test/unit/missing_year_test.rb: already exists in index
>> error: test/unit/axle_test.rb: already exists in index
>> error: test/unit/body_style_test.rb: already exists in index
>> error: test/unit/brake_test.rb: already exists in index
>> error: test/unit/category_test.rb: already exists in index
>> error: test/unit/comment_test.rb: already exists in index
>> error: test/unit/company_comment_test.rb: does not exist in index
>> error: test/unit/country_test.rb: already exists in index
>> *********
>>
>>
>> but I ignore that error, because I have no idea what it means.  If I
>
> Not a good general approach. If there are errors to begin with  
> there is
> no reason to expect success later on.
>
> Here, I assume you are starting from a dirty working tree. What did  
> git
> status say before the rebase?
>
>> were to guess, I'd say it's trying to copy files from master to my
>> current branch.  Of course.
>>
>> So now I have added my conflict fixes, per the message:
>>
>> *********
>> Failed to merge in the changes.
>> Patch failed at 0002.
>>
>> When you have resolved this problem run "git rebase --continue".
>> If you would prefer to skip this patch, instead run "git rebase -- 
>> skip".
>> To restore the original branch and stop rebasing run "git rebase --
>> abort".
>> *********
>
> What command triggered that message? It's certainly not saying that  
> you
> have added your conflict fixes, as you seem to think.
>
>>
>> So I decide to continue:
>>
>> *********
>> git rebase --continue
>> *********
>>
>>
>> And I get the following:
>>
>> *********
>> mymac:/Library/mydir/code/myapp me$ git rebase --continue
>> Unknown option: 1
>> Usage: head [-options] <url>...
>>      -m <method>   use method for the request (default is 'HEAD')
>>      -f            make request even if head believes method is  
>> illegal
>>      -b <base>     Use the specified URL as base
>>      -t <timeout>  Set timeout value
>>      -i <time>     Set the If-Modified-Since header on the request
>>      -c <conttype> use this content-type for POST, PUT, CHECKIN
>>      -a            Use text mode for content I/O
>>      -p <proxyurl> use this as a proxy
>>      -P            don't load proxy settings from environment
>>      -H <header>   send this HTTP header (you can specify several)
>>
>>      -u            Display method and URL before any response
>>      -U            Display request headers (implies -u)
>>      -s            Display response status code
>>      -S            Display response status chain
>>      -e            Display response headers
>>      -d            Do not display content
>>      -o <format>   Process HTML content in various ways
>>
>>      -v            Show program version
>>      -h            Print this message
>>
>>      -x            Extra debugging output
>> Applying
>> You still have unmerged paths in your index
>> did you forget to use 'git add'?
>>
>> When you have resolved this problem run "git rebase --continue".
>> If you would prefer to skip this patch, instead run "git rebase -- 
>> skip".
>> To restore the original branch and stop rebasing run "git rebase --
>> abort".
>>
>> *********
>>
>>
>> A google search of "git" and "Unknown option: 1" yields zero
>> results.
>
> As the "Usage: head..." tells us, the message comes from the command
> "head", not from git. (head is used by git-rebase -i)
>
>> Notice I did not commit the adds.  I didn't think it made
>> sense to do that, since I imagine that is what the rebase is doing
>> anyway?
>>
>> This is on git version 1.5.5.3.
>>
>> Should I upgrade git?  Will that break any repos that I have?
>
> Yes! No!
>
> Cheers,
> Michael
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Johannes Schindelin· Dec 4, 2008, 17:43 UTC · re: Adrian Klingel · lore

Re: git rebase --continue with goofy error

Hi,
On Thu, 4 Dec 2008, Adrian Klingel wrote:
> I found out why my "git rebase --continue" was failing.  Do I need to 
> explicitly add the .dotest directory and contents after each rebase 
> failure?
You did _what_?

The directory .dotest/ contains metadata of the rebase. That you have to add it probably means that your commits contain files in that directory. Which is bogus.

Just another proof that we were right to move .dotest/ into .git/ (which you will benefit from after an upgrade).

Ciao, Dscho

Adrian Klingel· Dec 4, 2008, 16:24 UTC · lore

Re: git rebase --continue with goofy error

That's the problem. I've resolved the conflicts, added everything. Then I run git rebase --continue and that's what I get. After I do the adds, am I supposed to commit them?

Adrian Klingel President/CEO Illumaware, LLC

Adrian.Klingel@illumaware.com phone: 800.880.4964 outside US: 919.783.4037 fax: 919-882.9447

On Dec 4, 2008, at 10:52 AM, Scott Taylor wrote:
Show 120 quoted lines
>
> On Dec 4, 2008, at 9:55 AM, Adrian Klingel wrote:
>
>> I am trying so, so hard to rebase a branch with updates made in  
>> master:
>>
>> *********
>> git rebase master
>> *********
>>
>> I get about 20 conflicts back, which I fix and do:
>>
>> *********
>> git add *
>> *********
>>
>> There were also many, many error messages after the rebase  
>> command, eg:
>>
>> *********
>> error: test/unit/missing_year_test.rb: already exists in index
>> error: test/unit/axle_test.rb: already exists in index
>> error: test/unit/body_style_test.rb: already exists in index
>> error: test/unit/brake_test.rb: already exists in index
>> error: test/unit/category_test.rb: already exists in index
>> error: test/unit/comment_test.rb: already exists in index
>> error: test/unit/company_comment_test.rb: does not exist in index
>> error: test/unit/country_test.rb: already exists in index
>> *********
>>
>>
>> but I ignore that error, because I have no idea what it means.  If  
>> I were to guess, I'd say it's trying to copy files from master to  
>> my current branch.  Of course.
>>
>> So now I have added my conflict fixes, per the message:
>>
>> *********
>> Failed to merge in the changes.
>> Patch failed at 0002.
>>
>> When you have resolved this problem run "git rebase --continue".
>> If you would prefer to skip this patch, instead run "git rebase -- 
>> skip".
>> To restore the original branch and stop rebasing run "git rebase -- 
>> abort".
>> *********
>>
>>
>> So I decide to continue:
>>
>> *********
>> git rebase --continue
>> *********
>>
>>
>> And I get the following:
>>
>> *********
>> mymac:/Library/mydir/code/myapp me$ git rebase --continue
>> Unknown option: 1
>> Usage: head [-options] <url>...
>>    -m <method>   use method for the request (default is 'HEAD')
>>    -f            make request even if head believes method is illegal
>>    -b <base>     Use the specified URL as base
>>    -t <timeout>  Set timeout value
>>    -i <time>     Set the If-Modified-Since header on the request
>>    -c <conttype> use this content-type for POST, PUT, CHECKIN
>>    -a            Use text mode for content I/O
>>    -p <proxyurl> use this as a proxy
>>    -P            don't load proxy settings from environment
>>    -H <header>   send this HTTP header (you can specify several)
>>
>>    -u            Display method and URL before any response
>>    -U            Display request headers (implies -u)
>>    -s            Display response status code
>>    -S            Display response status chain
>>    -e            Display response headers
>>    -d            Do not display content
>>    -o <format>   Process HTML content in various ways
>>
>>    -v            Show program version
>>    -h            Print this message
>>
>>    -x            Extra debugging output
>> Applying
>> You still have unmerged paths in your index
>> did you forget to use 'git add'?
>>
>> When you have resolved this problem run "git rebase --continue".
>> If you would prefer to skip this patch, instead run "git rebase -- 
>> skip".
>> To restore the original branch and stop rebasing run "git rebase -- 
>> abort".
>>
>> *********
>>
>>
>> A google search of "git" and "Unknown option: 1" yields zero  
>> results.  Notice I did not commit the adds.  I didn't think it  
>> made sense to do that, since I imagine that is what the rebase is  
>> doing anyway?
>>
>
> I'm not sure what the first part of this is saying (The "unknown  
> option").
>
> The important part is later on:
>
> You still have unmerged paths in your index
> did you forget to use 'git add'?
>
> After you resolve any conflicts, make sure to git add any remaining  
> files before you "rebase --continue"
>
> Regards,
>
> Scott
>
>

← back to recent threads