{"thread":{"id":"23656","subject":"git checkout branch puzzle","startedAt":"2010-05-01T17:55:47Z","lastAt":"2010-05-06T20:30:11Z","messageCount":7,"participants":["Chris.Cheney","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"140697","messageId":"Xns9D6BC0C4C8784ChrisCheneytesconet@80.91.229.10","threadId":"23656","inReplyTo":null,"subject":"git checkout branch puzzle","fromName":"Chris.Cheney","fromEmail":"chris.cheney.nospam@tesco.net","sentAt":"2010-05-01T17:55:47Z","receivedAt":"2010-05-01T17:55:47Z","isPatch":false,"sender":{"key":"chris.cheney.nospam@tesco.net","avatar":null},"body":"I have been using msysgit (curently 1.7.0.2.msysgit.0) for about 18 months \nand thought that I had managed to understand most things. However, the \nfollowing sequence has me baffled:\n\na) on branch 'master', git status shows that the working directory is clean\n\nb) git checkout HEAD^ gives the usual moan about moving to a head which \nisn't a local branch\n\nc) git checkout master followed by git status gives \"changed but not \nupdated\" and a list of \"modified\" files\n\nd) git reset --hard does not change the situation\n\nI suspect the situation arose as a result of 'mv'ing some files without \nusing git mv, but the resulting state above seems unreasonable.\n\nAny explanation of (c)/(d) would be appreciated.\n\nAs a result, I have started using git add -A rather than got add . (and \nwonder why it isn't documented as the default thing to do).\n\nTIA for any light on this.\n"},{"id":"140728","messageId":"20100502045901.GD14776@coredump.intra.peff.net","threadId":"23656","inReplyTo":"Xns9D6BC0C4C8784ChrisCheneytesconet@80.91.229.10","subject":"Re: git checkout branch puzzle","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-05-02T04:59:01Z","receivedAt":"2010-05-02T04:59:01Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, May 01, 2010 at 05:55:47PM +0000, Chris.Cheney wrote:\n\n> I have been using msysgit (curently 1.7.0.2.msysgit.0) for about 18 months \n> and thought that I had managed to understand most things. However, the \n> following sequence has me baffled:\n> \n> a) on branch 'master', git status shows that the working directory is clean\n> \n> b) git checkout HEAD^ gives the usual moan about moving to a head which \n> isn't a local branch\n> \n> c) git checkout master followed by git status gives \"changed but not \n> updated\" and a list of \"modified\" files\n\nPart (c) shouldn't show anything in \"git status\". I wonder if it is a\nline-ending conversion issue, since you are using msysgit, and since\nthat is the usual culprit for files mysteriously looking changed. Might\nyou have recently changed the settings of core.autocrlf?\n\n-Peff\n"},{"id":"140741","messageId":"Xns9D6C65C2DB06EChrisCheneytesconet@80.91.229.10","threadId":"23656","inReplyTo":"20100502045901.GD14776@coredump.intra.peff.net","subject":"Re: git checkout branch puzzle","fromName":"Chris.Cheney","fromEmail":"chris.cheney.nospam@tesco.net","sentAt":"2010-05-02T08:58:58Z","receivedAt":"2010-05-02T08:58:58Z","isPatch":false,"sender":{"key":"chris.cheney.nospam@tesco.net","avatar":null},"body":"Jeff King <peff@peff.net> wrote in\nnews:20100502045901.GD14776@coredump.intra.peff.net: \n\n> On Sat, May 01, 2010 at 05:55:47PM +0000, Chris.Cheney wrote:\n> \n>> I have been using msysgit (curently 1.7.0.2.msysgit.0) for about 18\n>> months and thought that I had managed to understand most things.\n>> However, the following sequence has me baffled:\n>> \n>> a) on branch 'master', git status shows that the working directory is\n>> clean \n>> \n>> b) git checkout HEAD^ gives the usual moan about moving to a head\n>> which isn't a local branch\n>> \n>> c) git checkout master followed by git status gives \"changed but not \n>> updated\" and a list of \"modified\" files\n> \n> Part (c) shouldn't show anything in \"git status\". I wonder if it is a\n> line-ending conversion issue, since you are using msysgit, and since\n> that is the usual culprit for files mysteriously looking changed.\n> Might you have recently changed the settings of core.autocrlf?\n> \n> -Peff\n> \n\nThanks for the reply and confirming what I believed about (c). \n\nIt is possible that what you suggest might be involved - it's a 2-developer \nsituation, each using msysgit with their own local repository and a remote \nmaster (bare) repository. I'll compare the other's config file against \nmine.\n\nChris\n"},{"id":"140792","messageId":"Xns9D6CD773D97E5ChrisCheneytesconet@80.91.229.10","threadId":"23656","inReplyTo":"Xns9D6C65C2DB06EChrisCheneytesconet@80.91.229.10","subject":"Re: git checkout branch puzzle","fromName":"Chris.Cheney","fromEmail":"chris.cheney.nospam@tesco.net","sentAt":"2010-05-02T20:09:32Z","receivedAt":"2010-05-02T20:09:32Z","isPatch":false,"sender":{"key":"chris.cheney.nospam@tesco.net","avatar":null},"body":"\"Chris.Cheney\" <chris.cheney.nospam@tesco.net> wrote in\nnews:Xns9D6C65C2DB06EChrisCheneytesconet@80.91.229.10: \n\n> Jeff King <peff@peff.net> wrote in\n> news:20100502045901.GD14776@coredump.intra.peff.net: \n> \n>> On Sat, May 01, 2010 at 05:55:47PM +0000, Chris.Cheney wrote:\n>> \n>>> I have been using msysgit (curently 1.7.0.2.msysgit.0) for about 18\n>>> months and thought that I had managed to understand most things.\n>>> However, the following sequence has me baffled:\n>>> \n>>> a) on branch 'master', git status shows that the working directory\n>>> is clean \n>>> \n>>> b) git checkout HEAD^ gives the usual moan about moving to a head\n>>> which isn't a local branch\n>>> \n>>> c) git checkout master followed by git status gives \"changed but not\n>>> updated\" and a list of \"modified\" files\n>> \n>> Part (c) shouldn't show anything in \"git status\". I wonder if it is a\n>> line-ending conversion issue, since you are using msysgit, and since\n>> that is the usual culprit for files mysteriously looking changed.\n>> Might you have recently changed the settings of core.autocrlf?\n>> \n>> -Peff\n>> \n> \n> Thanks for the reply and confirming what I believed about (c). \n> \n> It is possible that what you suggest might be involved - it's a\n> 2-developer situation, each using msysgit with their own local\n> repository and a remote master (bare) repository. I'll compare the\n> other's config file against mine.\n\nNeither of our config files contain autocrlf settings, but it's something \nthat I'll look further into. Neither of us had made recent config changes.\n"},{"id":"140811","messageId":"20100503064053.GA20002@coredump.intra.peff.net","threadId":"23656","inReplyTo":"Xns9D6CD773D97E5ChrisCheneytesconet@80.91.229.10","subject":"Re: git checkout branch puzzle","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-05-03T06:40:53Z","receivedAt":"2010-05-03T06:40:53Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, May 02, 2010 at 08:09:32PM +0000, Chris.Cheney wrote:\n\n> > Thanks for the reply and confirming what I believed about (c). \n> > \n> > It is possible that what you suggest might be involved - it's a\n> > 2-developer situation, each using msysgit with their own local\n> > repository and a remote master (bare) repository. I'll compare the\n> > other's config file against mine.\n> \n> Neither of our config files contain autocrlf settings, but it's something \n> that I'll look further into. Neither of us had made recent config changes.\n\nI believe autocrlf is on by default for msysgit. But if there is nothing\nin your config, then probably nothing changed. If you can reproduce the\nsituation, it might be worth narrowing down a simple test case and\nposting the exact commands and output.\n\n-Peff\n"},{"id":"140816","messageId":"Xns9D6D5CD466CE2ChrisCheneytesconet@80.91.229.10","threadId":"23656","inReplyTo":"20100503064053.GA20002@coredump.intra.peff.net","subject":"Re: git checkout branch puzzle","fromName":"Chris.Cheney","fromEmail":"chris.cheney.nospam@tesco.net","sentAt":"2010-05-03T08:06:15Z","receivedAt":"2010-05-03T08:06:15Z","isPatch":false,"sender":{"key":"chris.cheney.nospam@tesco.net","avatar":null},"body":"Jeff King <peff@peff.net> wrote in\nnews:20100503064053.GA20002@coredump.intra.peff.net: \n\n> On Sun, May 02, 2010 at 08:09:32PM +0000, Chris.Cheney wrote:\n> \n>> Neither of our config files contain autocrlf settings, but it's\n>> something that I'll look further into. Neither of us had made recent\n>> config changes. \n> \n> I believe autocrlf is on by default for msysgit. But if there is\n> nothing in your config, then probably nothing changed. If you can\n> reproduce the situation, it might be worth narrowing down a simple\n> test case and posting the exact commands and output.\n\nThanks. Indeed, after asking here, that was to be my next step - I need to \nrestock up on round tuits :-)\n\nFWIW My money is on a rm/git-rm or a mv/git-mv \"user\" error.\n\nChris\n"},{"id":"141084","messageId":"Xns9D70DAFB1423DChrisCheneytesconet@80.91.229.10","threadId":"23656","inReplyTo":"Xns9D6D5CD466CE2ChrisCheneytesconet@80.91.229.10","subject":"Re: git checkout branch puzzle","fromName":"Chris.Cheney","fromEmail":"chris.cheney.nospam@tesco.net","sentAt":"2010-05-06T20:30:11Z","receivedAt":"2010-05-06T20:30:11Z","isPatch":false,"sender":{"key":"chris.cheney.nospam@tesco.net","avatar":null},"body":"\"Chris.Cheney\" <chris.cheney.nospam@tesco.net> wrote in\nnews:Xns9D6D5CD466CE2ChrisCheneytesconet@80.91.229.10: \n\n> Jeff King <peff@peff.net> wrote in\n> news:20100503064053.GA20002@coredump.intra.peff.net: \n> \n>> On Sun, May 02, 2010 at 08:09:32PM +0000, Chris.Cheney wrote:\n>> \n>>> Neither of our config files contain autocrlf settings, but it's\n>>> something that I'll look further into. Neither of us had made recent\n>>> config changes. \n>> \n>> I believe autocrlf is on by default for msysgit. But if there is\n>> nothing in your config, then probably nothing changed. If you can\n>> reproduce the situation, it might be worth narrowing down a simple\n>> test case and posting the exact commands and output.\n> \n> Thanks. Indeed, after asking here, that was to be my next step - I\n> need to restock up on round tuits :-)\n> \n> FWIW My money is on a rm/git-rm or a mv/git-mv \"user\" error.\n\nI would have lost my money.\n\nYou were almost spot-on. It turned out that my remote collaborator was \nusing a version of msysgit prior to the default of autocrlf being true.\n\nWe'll be recloning from a freshly built repository r.s.n.\n\nThanks for your help\n\nChris\n"}]}