{"thread":{"id":"24137","subject":"git pull (Your local changes to ... would be overwritten by merge)","startedAt":"2010-06-17T09:35:55Z","lastAt":"2010-06-18T07:44:27Z","messageCount":9,"participants":["Daniel Blendea","Santi Béjar","Michael J Gruber","Matthieu Moy","Eyvind Bernhardsen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"143852","messageId":"AANLkTimeIWseETfYiMajIqesjJ_p55pRislnQQIaCrbG@mail.gmail.com","threadId":"24137","inReplyTo":"AANLkTinokUxiDdetcrsrlSExQ7hmhLS5szbTt9KzGKr_@mail.gmail.com","subject":"git pull (Your local changes to ... would be overwritten by merge)","fromName":"Daniel Blendea","fromEmail":"bdaniel7@gmail.com","sentAt":"2010-06-17T09:35:55Z","receivedAt":"2010-06-17T09:35:55Z","isPatch":false,"sender":{"key":"bdaniel7@gmail.com","avatar":null},"body":"Hello,\n\nA while ago I have cloned on my computer a git repo.\nSince then, the developers have modified several files in the repo.\nNow I want to update my copy with the latest changes.\n\nI do 'git pull' but I get 'Your local changes to .... would be\noverwritten by merge.  Aborting.'\nI didn't modified any local file. I tried using 'git stash save' but no luck.\n\nHow can I make git update and override my local copy?\nWith all the fuss about it, I thought I will handle this operation\npretty easily.\n\nThank you,\nDaniel\n"},{"id":"143853","messageId":"AANLkTimakxkEzFHSwezpXelLV171zGFEQULNEVpJlrah@mail.gmail.com","threadId":"24137","inReplyTo":"AANLkTimeIWseETfYiMajIqesjJ_p55pRislnQQIaCrbG@mail.gmail.com","subject":"Re: git pull (Your local changes to ... would be overwritten by merge)","fromName":"Santi Béjar","fromEmail":"santi@agolina.net","sentAt":"2010-06-17T09:46:26Z","receivedAt":"2010-06-17T09:46:26Z","isPatch":false,"sender":{"key":"santi@agolina.net","avatar":null},"body":"On Thu, Jun 17, 2010 at 11:35 AM, Daniel Blendea <bdaniel7@gmail.com> wrote:\n> Hello,\n>\n> A while ago I have cloned on my computer a git repo.\n> Since then, the developers have modified several files in the repo.\n> Now I want to update my copy with the latest changes.\n>\n> I do 'git pull' but I get 'Your local changes to .... would be\n> overwritten by merge.  Aborting.'\n> I didn't modified any local file. I tried using 'git stash save' but no luck.\n\nAre they known to git? What is their status (git status)?\n\nIf they are not known to git, it seams that there are *new* files both\nin the remote branch and the working copy (new files in the working\ncopy are not saved with 'git stash save').\n\nI would rename/mv the conflicting new files in the working copy,\nperform the pull and maybe compare the new files from the branch with\nthe ones from the working copy.\n\nHTH,\nSanti\n"},{"id":"143854","messageId":"AANLkTinQkCH5OhnoerCJs2x_2uChwaqVPApeezwcYy1o@mail.gmail.com","threadId":"24137","inReplyTo":"AANLkTimakxkEzFHSwezpXelLV171zGFEQULNEVpJlrah@mail.gmail.com","subject":"Re: git pull (Your local changes to ... would be overwritten by merge)","fromName":"Daniel Blendea","fromEmail":"bdaniel7@gmail.com","sentAt":"2010-06-17T10:20:31Z","receivedAt":"2010-06-17T10:20:31Z","isPatch":false,"sender":{"key":"bdaniel7@gmail.com","avatar":null},"body":"I have no idea, I know git just barely to be able to update my copy\nonce in a while, then build it to get the binaries.\nI didn't modified anything and the build script builds the binaries in\na different location.\n\nThe file which threw the first error was already in my copy and it was\nmodified in the remote branch.\n---\nDaniel\n\n\n\nOn Thu, Jun 17, 2010 at 12:46, Santi Béjar <santi@agolina.net> wrote:\n> On Thu, Jun 17, 2010 at 11:35 AM, Daniel Blendea <bdaniel7@gmail.com> wrote:\n>> Hello,\n>>\n>> A while ago I have cloned on my computer a git repo.\n>> Since then, the developers have modified several files in the repo.\n>> Now I want to update my copy with the latest changes.\n>>\n>> I do 'git pull' but I get 'Your local changes to .... would be\n>> overwritten by merge.  Aborting.'\n>> I didn't modified any local file. I tried using 'git stash save' but no luck.\n>\n> Are they known to git? What is their status (git status)?\n>\n> If they are not known to git, it seams that there are *new* files both\n> in the remote branch and the working copy (new files in the working\n> copy are not saved with 'git stash save').\n>\n> I would rename/mv the conflicting new files in the working copy,\n> perform the pull and maybe compare the new files from the branch with\n> the ones from the working copy.\n>\n> HTH,\n> Santi\n>\n"},{"id":"143856","messageId":"4C19FBF8.6010709@drmicha.warpmail.net","threadId":"24137","inReplyTo":"AANLkTimeIWseETfYiMajIqesjJ_p55pRislnQQIaCrbG@mail.gmail.com","subject":"Re: git pull (Your local changes to ... would be overwritten by merge)","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-06-17T10:42:00Z","receivedAt":"2010-06-17T10:42:00Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Daniel Blendea venit, vidit, dixit 17.06.2010 11:35:\n> Hello,\n> \n> A while ago I have cloned on my computer a git repo.\n> Since then, the developers have modified several files in the repo.\n> Now I want to update my copy with the latest changes.\n> \n> I do 'git pull' but I get 'Your local changes to .... would be\n> overwritten by merge.  Aborting.'\n> I didn't modified any local file. I tried using 'git stash save' but no luck.\n> \n> How can I make git update and override my local copy?\n> With all the fuss about it, I thought I will handle this operation\n> pretty easily.\n\nIf you are sure you have no own modifications which you would miss:\n\ngit fetch --all\ngit reset --hard origin/master\n\nFetch is pull without trying to merge or rebase anything.\nthe send line resets your master branch to what you just fetched.\n\nMost likely the remote side did a non-forward push and brought you in\nthat situation.\n\n[Which, on a side note, is one reason why I still believe that git\nshould not create any local branch for a clone. git fetch && git\ncheckout origin/master does not suffer from this issue.]\n\nMichael\n"},{"id":"143857","messageId":"vpq4oh1zzfs.fsf@bauges.imag.fr","threadId":"24137","inReplyTo":"4C19FBF8.6010709@drmicha.warpmail.net","subject":"Re: git pull (Your local changes to ... would be overwritten by merge)","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-06-17T11:11:19Z","receivedAt":"2010-06-17T11:11:19Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> Daniel Blendea venit, vidit, dixit 17.06.2010 11:35:\n>> Hello,\n>> \n>> A while ago I have cloned on my computer a git repo.\n>> Since then, the developers have modified several files in the repo.\n>> Now I want to update my copy with the latest changes.\n>> \n>> I do 'git pull' but I get 'Your local changes to .... would be\n>> overwritten by merge.  Aborting.'\n>> I didn't modified any local file. I tried using 'git stash save' but no luck.\n\nWhich OS? Do you have any crlf conversion enabled? Any filter set in\n.gitattributes?\n\n> Most likely the remote side did a non-forward push and brought you in\n> that situation.\n\nA non-fast forward push would force a non-fast forward pull,\npossibly/probably with conflicts, but wouldn't trigger this message,\nwhich is generated before the merge is actually started.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"143858","messageId":"AANLkTinWS0zWhh0d-yrb7eWMEeQenoAF8tA6-l9BRP_q@mail.gmail.com","threadId":"24137","inReplyTo":"vpq4oh1zzfs.fsf@bauges.imag.fr","subject":"Re: git pull (Your local changes to ... would be overwritten by merge)","fromName":"Daniel Blendea","fromEmail":"bdaniel7@gmail.com","sentAt":"2010-06-17T11:18:21Z","receivedAt":"2010-06-17T11:18:21Z","isPatch":false,"sender":{"key":"bdaniel7@gmail.com","avatar":null},"body":"Windows 7, did not change anything related to crlf.\n\nI solved the problem with\n\ngit fetch --all\ngit reset --hard origin/master\n\n---\nDaniel\n\n\n\nOn Thu, Jun 17, 2010 at 14:11, Matthieu Moy\n<Matthieu.Moy@grenoble-inp.fr> wrote:\n> Michael J Gruber <git@drmicha.warpmail.net> writes:\n>\n>> Daniel Blendea venit, vidit, dixit 17.06.2010 11:35:\n>>> Hello,\n>>>\n>>> A while ago I have cloned on my computer a git repo.\n>>> Since then, the developers have modified several files in the repo.\n>>> Now I want to update my copy with the latest changes.\n>>>\n>>> I do 'git pull' but I get 'Your local changes to .... would be\n>>> overwritten by merge.  Aborting.'\n>>> I didn't modified any local file. I tried using 'git stash save' but no luck.\n>\n> Which OS? Do you have any crlf conversion enabled? Any filter set in\n> .gitattributes?\n>\n>> Most likely the remote side did a non-forward push and brought you in\n>> that situation.\n>\n> A non-fast forward push would force a non-fast forward pull,\n> possibly/probably with conflicts, but wouldn't trigger this message,\n> which is generated before the merge is actually started.\n>\n> --\n> Matthieu Moy\n> http://www-verimag.imag.fr/~moy/\n>\n"},{"id":"143860","messageId":"4C1A0DCD.2070906@drmicha.warpmail.net","threadId":"24137","inReplyTo":"AANLkTinWS0zWhh0d-yrb7eWMEeQenoAF8tA6-l9BRP_q@mail.gmail.com","subject":"Re: git pull (Your local changes to ... would be overwritten by merge)","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-06-17T11:58:05Z","receivedAt":"2010-06-17T11:58:05Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Daniel Blendea venit, vidit, dixit 17.06.2010 13:18:\n> Windows 7, did not change anything related to crlf.\n> \n> I solved the problem with\n> \n> git fetch --all\n> git reset --hard origin/master\n\nI guess this shows that correct diagnostics is not a prerequisite for a\nsuccessful therapy ;)\n\n(The diagnostics really indicate a work tree with local uncommitted\nmodifications.)\n\nMichael\n"},{"id":"143872","messageId":"vpqbpb9ofby.fsf@bauges.imag.fr","threadId":"24137","inReplyTo":"4C1A0DCD.2070906@drmicha.warpmail.net","subject":"Re: git pull (Your local changes to ... would be overwritten by merge)","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-06-17T15:21:05Z","receivedAt":"2010-06-17T15:21:05Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> Daniel Blendea venit, vidit, dixit 17.06.2010 13:18:\n>> Windows 7, did not change anything related to crlf.\n\nI never used Git on Windows, but I think Git sets autocrlf to true by\ndefault on Windows.\n\n> I guess this shows that correct diagnostics is not a prerequisite for a\n> successful therapy ;)\n>\n> (The diagnostics really indicate a work tree with local uncommitted\n> modifications.)\n\nI'd bet for this kind of issue:\n\nhttp://kerneltrap.org/mailarchive/git/2010/3/9/25215/thread\nFrom: Johannes Schindelin\nSubject: core.autocrlf considered half-assed\n\nDidn't follow the outcome in details, but some patches were proposed\nto improve the situation.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"143896","messageId":"BFBC3418-44C5-484D-8508-60813675409D@gmail.com","threadId":"24137","inReplyTo":"vpqbpb9ofby.fsf@bauges.imag.fr","subject":"Re: git pull (Your local changes to ... would be overwritten by merge)","fromName":"Eyvind Bernhardsen","fromEmail":"eyvind.bernhardsen@gmail.com","sentAt":"2010-06-18T07:44:27Z","receivedAt":"2010-06-18T07:44:27Z","isPatch":false,"sender":{"key":"eyvind.bernhardsen@gmail.com","avatar":"https://avatars.githubusercontent.com/u/106762?v=4"},"body":"On 17. juni 2010, at 17.21, Matthieu Moy wrote:\n\n> Michael J Gruber <git@drmicha.warpmail.net> writes:\n> \n>> I guess this shows that correct diagnostics is not a prerequisite for a\n>> successful therapy ;)\n>> \n>> (The diagnostics really indicate a work tree with local uncommitted\n>> modifications.)\n> \n> I'd bet for this kind of issue:\n> \n> http://kerneltrap.org/mailarchive/git/2010/3/9/25215/thread\n> From: Johannes Schindelin\n> Subject: core.autocrlf considered half-assed\n> \n> Didn't follow the outcome in details, but some patches were proposed\n> to improve the situation.\n\nFinn Arne Gangstad's \"safe autocrlf\" patch (c480539, currently in next) solves the problem by disabling conversion for files that contain CRs in the repository.\n-- \nEyvind Bernhardsen\n"}]}