update failed on git

Luis Carlos Cobo luisca at cozybit.com
Wed Dec 26 03:46:59 EST 2007


On Mon, 2007-12-24 at 15:37 +0530, Mohamed Imran K R wrote:
> $ git clone ssh://quimby/home/luisca/backup-rosita/dev/o80211s/wireless-2.6

That has been already corrected in the wiki, thanks for pointing it out.

> so i tried the normal git-pull on my existing git folder
> 
> # git pull

> Automatic merge failed; fix conflicts and then commit the result.

We track wireless-2.6, which is constantly rebasing with the latest
releases of the kernel, so we have to rebase with them too. Rebasing is
kind of 'rewriting the history of the project', so it will cause linear
upgrades like the ones supposed to be performed with git-pull fail. To
fix this, you can either run git-clone from the beggining or, with your
existing repository do:

$ git-reset --hard 
(to clean the dirty state left by the unsuccesful update)

Then edit, in your existing git folder, .git/config. On remote "origin"
section, 'fetch' line, change it so it looks like

        fetch = +refs/heads/*:refs/remotes/origin/*

(the important change is the '+', it makes git now that the repository
is subject to rebases and does the right thing). Then run

$ git-pull

again.

Please consider that any changes you my have done locally to 'master'
branch will be probably lost, so save them to another branch.

Hope this helps, let me know (or send a mail to the list from you
address without the 'lan') if you have more troubles.


-- 
Luis Carlos Cobo Rus       GnuPG ID: 44019B60
cozybit Inc.




More information about the Devel mailing list