{"thread":{"id":"19971","subject":"correct workflow with bare repo and pull?","startedAt":"2009-06-30T00:01:15Z","lastAt":"2009-06-30T08:14:46Z","messageCount":3,"participants":["Tim","Andreas Ericsson","Robin Rosenberg"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"117197","messageId":"583913.73865.qm@web52205.mail.re2.yahoo.com","threadId":"19971","inReplyTo":null,"subject":"correct workflow with bare repo and pull?","fromName":"Tim","fromEmail":"opensourcetim@yahoo.com","sentAt":"2009-06-30T00:01:15Z","receivedAt":"2009-06-30T00:01:15Z","isPatch":false,"sender":{"key":"opensourcetim@yahoo.com","avatar":null},"body":"\nMyself and the other developer on the team have private repos, and we\npush to a bare repo (which we use for Hudson builds).  For now we only\nuse the master branch.  No other remote repos.  When another developer\npushes changes to the bare repo, and I pull them, all of the files they\npushed show up as modified on my box when I do \"git status\" (even\nthough I had not modified them).  How to avoid this?   Also, one\ndeveloper saw really strange results when they did a \"git pull origin\nmaster\" and \"git status\" -- the paths shown below do not exist in the\nlocal work area.  These files have always lived under a-core/.... so it\nis really odd that they show up under a-web\n# On branch master\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#\n#    new file:   a-web/src/main/java/com/blah/account/Account.java\n#    new file:   a-web/src/main/java/com/blah/account/AccountType.java\n#\n# Changed but not updated:\n#   (use \"git add/rm <file>...\" to update what will be committed)\n#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n#\n#    deleted:    a-web/src/main/java/com/blah/account/Account.java\n#    deleted:    a-web/src/main/java/com/blah/account/AccountType.java\n\nWhat are we doing wrong?  \n\n\n      \n"},{"id":"117211","messageId":"4A49B086.30000@op5.se","threadId":"19971","inReplyTo":"583913.73865.qm@web52205.mail.re2.yahoo.com","subject":"Re: correct workflow with bare repo and pull?","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2009-06-30T06:28:22Z","receivedAt":"2009-06-30T06:28:22Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Tim wrote:\n> Myself and the other developer on the team have private repos, and we\n> push to a bare repo (which we use for Hudson builds).  For now we only\n> use the master branch.  No other remote repos.  When another developer\n> pushes changes to the bare repo, and I pull them, all of the files they\n> pushed show up as modified on my box when I do \"git status\" (even\n> though I had not modified them).  How to avoid this?\n\nMake sure neither of you modify the executable bit on the files, and make\nsure your editors work the same in both ends wrt the last line and white-\nspace at the ends of lines.\n\nAlso make sure you have compatible crlf settings in your git configs.\n\nIf your editors are what's causing the problem, you should only see the\nfiles you've actually opened in your editor as being different. If it's\nyour git configuration, \"git pull && git status\" should show differences\nimmediately. \"git help config\" and searching for core.autocrlf should\npoint you in the right direction to what might be causing the error.\nIf it's modechanges that's the problem. core.filemode may also be a\npossible source of errors (it has to be \"false\" on windows but can be\n\"true\" on systems with posix permissions).\n\n>   Also, one\n> developer saw really strange results when they did a \"git pull origin\n> master\" and \"git status\" -- the paths shown below do not exist in the\n> local work area.  These files have always lived under a-core/.... so it\n> is really odd that they show up under a-web\n> # On branch master\n> # Changes to be committed:\n> #   (use \"git reset HEAD <file>...\" to unstage)\n> #\n> #    new file:   a-web/src/main/java/com/blah/account/Account.java\n> #    new file:   a-web/src/main/java/com/blah/account/AccountType.java\n> #\n> # Changed but not updated:\n> #   (use \"git add/rm <file>...\" to update what will be committed)\n> #   (use \"git checkout -- <file>...\" to discard changes in working directory)\n> #\n> #    deleted:    a-web/src/main/java/com/blah/account/Account.java\n> #    deleted:    a-web/src/main/java/com/blah/account/AccountType.java\n> \n> What are we doing wrong?  \n> \n\nHard to tell without knowing what the repository looks like. Is this\na repo you can share with us?\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n\nConsidering the successes of the wars on alcohol, poverty, drugs and\nterror, I think we should give some serious thought to declaring war\non peace.\n"},{"id":"117220","messageId":"200906301014.46540.robin.rosenberg.lists@dewire.com","threadId":"19971","inReplyTo":"4A49B086.30000@op5.se","subject":"Re: correct workflow with bare repo and pull?","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2009-06-30T08:14:46Z","receivedAt":"2009-06-30T08:14:46Z","isPatch":false,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"tisdag 30 juni 2009 08:28:22 skrev Andreas Ericsson <ae@op5.se>:\n> Tim wrote:\n> > Myself and the other developer on the team have private repos, and we\n> > push to a bare repo (which we use for Hudson builds).  For now we only\n> > use the master branch.  No other remote repos.  When another developer\n> > pushes changes to the bare repo, and I pull them, all of the files they\n> > pushed show up as modified on my box when I do \"git status\" (even\n> > though I had not modified them).  How to avoid this?\n> \n> Make sure neither of you modify the executable bit on the files, and make\n> sure your editors work the same in both ends wrt the last line and white-\n> space at the ends of lines.\n> \n> Also make sure you have compatible crlf settings in your git configs.\n> \n> If your editors are what's causing the problem, you should only see the\n> files you've actually opened in your editor as being different. If it's\n> your git configuration, \"git pull && git status\" should show differences\n> immediately. \"git help config\" and searching for core.autocrlf should\n> point you in the right direction to what might be causing the error.\n> If it's modechanges that's the problem. core.filemode may also be a\n> possible source of errors (it has to be \"false\" on windows but can be\n> \"true\" on systems with posix permissions).\n> \n> >   Also, one\n> > developer saw really strange results when they did a \"git pull origin\n> > master\" and \"git status\" -- the paths shown below do not exist in the\n> > local work area.  These files have always lived under a-core/.... so it\n> > is really odd that they show up under a-web\n> > # On branch master\n> > # Changes to be committed:\n> > #   (use \"git reset HEAD <file>...\" to unstage)\n> > #\n> > #    new file:   a-web/src/main/java/com/blah/account/Account.java\n> > #    new file:   a-web/src/main/java/com/blah/account/AccountType.java\n> > #\n> > # Changed but not updated:\n> > #   (use \"git add/rm <file>...\" to update what will be committed)\n> > #   (use \"git checkout -- <file>...\" to discard changes in working directory)\n> > #\n> > #    deleted:    a-web/src/main/java/com/blah/account/Account.java\n> > #    deleted:    a-web/src/main/java/com/blah/account/AccountType.java\n> > \n> > What are we doing wrong?  \n> > \n> \n> Hard to tell without knowing what the repository looks like. Is this\n> a repo you can share with us?\n\n\"Changes to be committed\" is the index\n\"Changed but not updated\" is the workdir.\n\nSo modify the files, update the index (git add -u) and then rm (not git rm) the files\nand you get this. But from a pull/merge only you should not get this state.\n\nA possible way,is if you had non-ascii filenames and one of the trees was produced using the Eclipse plugin. \nFor non-ascii names you could get corrupt (wrong order) trees and that would fool git when merging into\nproducing \"interesting\" results.  See http://egit.googlecode.com for instructions for upgrading to the latest\npre-built plugin.\n\n-- robin\n"}]}