{"thread":{"id":"20811","subject":"Problems with GIT under Windows - \"not uptodate\"","startedAt":"2009-09-01T15:46:39Z","lastAt":"2009-09-01T23:19:21Z","messageCount":7,"participants":["david.hagood@gmail.com","Eric Raible","skillzero@gmail.com","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"122245","messageId":"a21e6af7ee05f56fd8c02d0955af1c72.squirrel@localhost","threadId":"20811","inReplyTo":null,"subject":"Problems with GIT under Windows - \"not uptodate\"","fromName":"","fromEmail":"david.hagood@gmail.com","sentAt":"2009-09-01T15:46:39Z","receivedAt":"2009-09-01T15:46:39Z","isPatch":false,"sender":{"key":"david.hagood@gmail.com","avatar":null},"body":"I am having a problem trying to support my poor, deluded cow-orkers who\nuse Windows and need to use GIT.\n\nThe scenario goes something like this:\n\nThey have a local repo, they have changes on their branch, they are\nstaging a commit to the master branch on their local.\n\nThey do a \"git merge\" and the merge has conflicts. They need to undo the\nmerge, so they do a \"git reset --hard\".\n\n>From that point onward, if they try to access the origin repository (e.g.\n\"git pull\") they get the error message\n\nError: Entry \"Some file name\" not uptodate: cannot merge.\n\nWe've tried \"git reset --hard; git pull .\" We've tried \"git reset --hard;\ngit checkout -f master\". Neither seems to fix this.\n\nWe Linux users don't see this.\n\nI conjecture it is something to do with DOS's CR/LF line endings (the\nfiles in question are a type of XML file which ALWAYS have CR/LF endings,\neven under Linux) - perhaps *something* in the GIT processing chain is\ntrying to do a CR/LF -> LF conversion, and screwing things up.\n\nDoes anybody have any suggestions on what I am doing wrong (Please, not\n\"you are using Windows\")?\n"},{"id":"122249","messageId":"loom.20090901T184650-434@post.gmane.org","threadId":"20811","inReplyTo":"a21e6af7ee05f56fd8c02d0955af1c72.squirrel@localhost","subject":"Re: Problems with GIT under Windows - \"not uptodate\"","fromName":"Eric Raible","fromEmail":"raible@gmail.com","sentAt":"2009-09-01T16:52:45Z","receivedAt":"2009-09-01T16:52:45Z","isPatch":false,"sender":{"key":"raible@gmail.com","avatar":null},"body":" <david.hagood <at> gmail.com> writes:\n\n> Error: Entry \"Some file name\" not uptodate: cannot merge.\n> \n> We've tried \"git reset --hard; git pull .\" We've tried \"git reset --hard;\n> git checkout -f master\". Neither seems to fix this.\n\nhttp://article.gmane.org/gmane.comp.version-control.git/122862\n"},{"id":"122251","messageId":"2729632a0909011119l3a19447ds9d4896a27ac488c1@mail.gmail.com","threadId":"20811","inReplyTo":"a21e6af7ee05f56fd8c02d0955af1c72.squirrel@localhost","subject":"Re: Problems with GIT under Windows - \"not uptodate\"","fromName":"","fromEmail":"skillzero@gmail.com","sentAt":"2009-09-01T18:19:44Z","receivedAt":"2009-09-01T18:19:44Z","isPatch":false,"sender":{"key":"skillzero@gmail.com","avatar":null},"body":"On Tue, Sep 1, 2009 at 8:46 AM, <david.hagood@gmail.com> wrote:\n> I am having a problem trying to support my poor, deluded cow-orkers who\n> use Windows and need to use GIT.\n>\n> The scenario goes something like this:\n>\n> They have a local repo, they have changes on their branch, they are\n> staging a commit to the master branch on their local.\n>\n> They do a \"git merge\" and the merge has conflicts. They need to undo the\n> merge, so they do a \"git reset --hard\".\n>\n> From that point onward, if they try to access the origin repository (e.g.\n> \"git pull\") they get the error message\n>\n> Error: Entry \"Some file name\" not uptodate: cannot merge.\n>\n> We've tried \"git reset --hard; git pull .\" We've tried \"git reset --hard;\n> git checkout -f master\". Neither seems to fix this.\n>\n> We Linux users don't see this.\n>\n> I conjecture it is something to do with DOS's CR/LF line endings (the\n> files in question are a type of XML file which ALWAYS have CR/LF endings,\n> even under Linux) - perhaps *something* in the GIT processing chain is\n> trying to do a CR/LF -> LF conversion, and screwing things up.\n>\n> Does anybody have any suggestions on what I am doing wrong (Please, not\n> \"you are using Windows\")?\n\nYeah I run into the same thing on Windows if somebody accidentally\nchecks in a CRLF file. Do you have core.autocrlf on? If you do, I\nthink the problem is that it's going to try to convert the line\nendings on every checkout/etc, but since the file is already CRLF (not\nLF as is normally in the repository), it's going to make the file look\ndifferent every time.\n\nIt seems like you want core.autocrlf to be false or you want a\n.gitattributes file to override it on a per-file basis for the files\nyou know are CRLF (i.e. the ones that are CRLF even on the Linux\nside).\n"},{"id":"122252","messageId":"e35db8f7ac1b5b2b2f080fb47f58c20a.squirrel@localhost","threadId":"20811","inReplyTo":"2729632a0909011119l3a19447ds9d4896a27ac488c1@mail.gmail.com","subject":"Re: Problems with GIT under Windows - \"not uptodate\"","fromName":"","fromEmail":"david.hagood@gmail.com","sentAt":"2009-09-01T18:25:07Z","receivedAt":"2009-09-01T18:25:07Z","isPatch":false,"sender":{"key":"david.hagood@gmail.com","avatar":null},"body":"\n> It seems like you want core.autocrlf to be false or you want a\n> .gitattributes file to override it on a per-file basis for the files\n> you know are CRLF (i.e. the ones that are CRLF even on the Linux\n> side).\n\nThat's what I've been leaning toward: a .gitattributes in that directory\nlike this:\n\n*.xml -crlf diff merge\n\nDoes that sound reasonable?\n"},{"id":"122266","messageId":"alpine.DEB.1.00.0909020052550.8306@pacific.mpi-cbg.de","threadId":"20811","inReplyTo":"loom.20090901T184650-434@post.gmane.org","subject":"Re: Problems with GIT under Windows - \"not uptodate\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-09-01T22:56:16Z","receivedAt":"2009-09-01T22:56:16Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nEric, is there any good reason you neglect netiquette?  I re-added David \nto the Cc: list.\n\nOn Tue, 1 Sep 2009, Eric Raible wrote:\n\n>  <david.hagood <at> gmail.com> writes:\n> \n> > Error: Entry \"Some file name\" not uptodate: cannot merge.\n> > \n> > We've tried \"git reset --hard; git pull .\" We've tried \"git reset --hard;\n> > git checkout -f master\". Neither seems to fix this.\n> \n> http://article.gmane.org/gmane.comp.version-control.git/122862\n\nTo summarize: the suggestion is \"rm .git/index && git reset --hard\".\n\nI have to stress the same point as in \"reset --hard considered harmful\" a \nwhile back, though.\n\nActually, I started writing a patch to provide \"git checkout --fix-crlf\" \nsome weeks ago, but I constantly run out of time to finish it.\n\nCiao,\nDscho\n"},{"id":"122268","messageId":"279b37b20909011616x60fc7bfav22daca1bc7bfc714@mail.gmail.com","threadId":"20811","inReplyTo":"alpine.DEB.1.00.0909020052550.8306@pacific.mpi-cbg.de","subject":"Re: Problems with GIT under Windows - \"not uptodate\"","fromName":"Eric Raible","fromEmail":"raible@gmail.com","sentAt":"2009-09-01T23:16:21Z","receivedAt":"2009-09-01T23:16:21Z","isPatch":false,"sender":{"key":"raible@gmail.com","avatar":null},"body":"On Tue, Sep 1, 2009 at 3:56 PM, Johannes\nSchindelin<Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n>\n> Eric, is there any good reason you neglect netiquette?  I re-added David\n> to the Cc: list.\n\nThanks.  Frankly I (stupidly) assumed that gmane.org would handle it.\nEducate me (if you would): if I read the git list via gmane, what's the\nbest way to follow up?\n"},{"id":"122272","messageId":"alpine.DEB.1.00.0909020118210.8306@pacific.mpi-cbg.de","threadId":"20811","inReplyTo":"279b37b20909011616x60fc7bfav22daca1bc7bfc714@mail.gmail.com","subject":"Re: Problems with GIT under Windows - \"not uptodate\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-09-01T23:19:21Z","receivedAt":"2009-09-01T23:19:21Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 1 Sep 2009, Eric Raible wrote:\n\n> On Tue, Sep 1, 2009 at 3:56 PM, Johannes\n> Schindelin<Johannes.Schindelin@gmx.de> wrote:\n>\n> > Eric, is there any good reason you neglect netiquette?  I re-added \n> > David to the Cc: list.\n> \n> Thanks.  Frankly I (stupidly) assumed that gmane.org would handle it. \n> Educate me (if you would): if I read the git list via gmane, what's the \n> best way to follow up?\n\nNo idea.  I read the mails in a normal mail program.  You'll have to find \nout yourself how to behave nicely with GMane's interface.\n\nCiao,\nDscho\n"}]}