{"thread":{"id":"27699","subject":"submodule/index/working tree woes","startedAt":"2011-06-24T18:25:46Z","lastAt":"2011-06-25T11:02:29Z","messageCount":2,"participants":["John Powell","Alexei Sholik"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"170537","messageId":"20110624182546.GB30640@vmware.com","threadId":"27699","inReplyTo":null,"subject":"submodule/index/working tree woes","fromName":"John Powell","fromEmail":"jpowell@vmware.com","sentAt":"2011-06-24T18:25:46Z","receivedAt":"2011-06-24T18:25:46Z","isPatch":false,"sender":{"key":"jpowell@vmware.com","avatar":null},"body":"I have no changes to be committed (tracked or untracked according to\n'git status') and yet when I try and switch branches git complains\nthat I have untracked working tree files that would be overridden\nand aborts before the switch. \n\nThe change I have just committed locally removes some files from the\nrepository and adds a submodule in it's place to better organize the\nsource for the project. \n\nShaka, when the walls fell.  Anyone want to assist me with this issue?\nFeeling clueless.\n"},{"id":"170542","messageId":"BANLkTi=4D1qqM+9EFZACHwVwSsVOkWQ4GQ@mail.gmail.com","threadId":"27699","inReplyTo":"BANLkTik6xij0ZNy9nB2sbiF97Z4EF76sHQ@mail.gmail.com","subject":"Re: submodule/index/working tree woes","fromName":"Alexei Sholik","fromEmail":"alcosholik@gmail.com","sentAt":"2011-06-25T11:02:29Z","receivedAt":"2011-06-25T11:02:29Z","isPatch":false,"sender":{"key":"alcosholik@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207748?v=4"},"body":"---------- Forwarded message ----------\nFrom: Alexei Sholik <alcosholik@gmail.com>\nDate: 25 June 2011 14:00\nSubject: Re: submodule/index/working tree woes\nTo: masterblaster@vmware.com\n\n\nOn 24 June 2011 21:25, John Powell <jpowell@vmware.com> wrote:\n> I have no changes to be committed (tracked or untracked according to\n> 'git status') and yet when I try and switch branches git complains\n> that I have untracked working tree files that would be overridden\n> and aborts before the switch.\n>\n> The change I have just committed locally removes some files from the\n> repository and adds a submodule in it's place to better organize the\n> source for the project.\n>\n> Shaka, when the walls fell.  Anyone want to assist me with this issue?\n> Feeling clueless.\n>\n\nGit is unable to remove a directory with submodule when switching\nbranches. If you have a submodule on one branch and a directory with\nthe same name on another branch, you'll have troubles.\n\nI'm speaking of version 1.7.3.4. Here's a small demo:\n$ mkdir test\n$ cd test\n$ git init\nInitialized empty Git repository in /Users/alco/Documents/git/test/.git/\n$ echo \"Hello\" >file.txt\n$ git add file.txt\n$ git commit -m 'test'\n[master (root-commit) 8e9c724] test\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 file.txt\n$ git checkout -b another\nSwitched to a new branch 'another'\n$ echo \"Bye\" >file2.txt\n$ git add file2.txt\n$ git commit -m 'second'\n[another 62e6da2] second\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 file2.txt\n$ git checkout master\nSwitched to branch 'master'\n$ git submodule add git://github.com/tweepy/tweepy.git\nCloning into tweepy...\n...\n$ git commit -m 'submodule'\n[master 3c9b6f7] submodule\n 2 files changed, 4 insertions(+), 0 deletions(-)\n create mode 100644 .gitmodules\n create mode 160000 tweepy\n$ git checkout another\nwarning: unable to rmdir tweepy: Directory not empty\nSwitched to branch 'another'\n$ ls tweepy/\nCONTRIBUTORS    INSTALL         LICENSE         README          docs\n         examples        setup.py        tests.py        tools\n  tweepy\n$ git version\ngit version 1.7.3.4\n\n--\nBest regards,\nAlexei Sholik\n\n\n\n-- \nBest regards,\nAlexei Sholik\n"}]}