{"thread":{"id":"17110","subject":"\"git add sub1/ sub2/\" doesn't work as expected when sub1 and sub2 has .git under them","startedAt":"2009-01-12T08:36:26Z","lastAt":"2009-01-12T08:36:26Z","messageCount":1,"participants":["Ping Yin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"100081","messageId":"46dff0320901120036h97d4162ucd37c17b9dfb6217@mail.gmail.com","threadId":"17110","inReplyTo":null,"subject":"\"git add sub1/ sub2/\" doesn't work as expected when sub1 and sub2 has .git under them","fromName":"Ping Yin","fromEmail":"pkufranky@gmail.com","sentAt":"2009-01-12T08:36:26Z","receivedAt":"2009-01-12T08:36:26Z","isPatch":false,"sender":{"key":"pkufranky@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5346?v=4"},"body":"Assume directories sub1 and sub2 have .git under them. \"git add sub1/\"\nworks as expected (files under sub1/ are added), howerver \"git add\nsub1/ sub2/\" doesn't work as expeced (sub1 and sub2 are added as\nsubmoudle).\n\n$ git --version git version 1.6.0.4.617.g2baf1\n\n# create repo super\n$ mkdir super && cd super && git init && git commit --allow-empty -m\n\"Initial commit\"\n\n# create repo super/sub1 with file sub1-file\n$ mkdir sub1 && cd sub1 && touch sub1-file\n$ git init && git add . && git commit -m \"Initial commit\" && cd ..\n\n# create repo super/sub2 with file sub2-file\n$ mkdir sub2 && cd sub2 && touch sub2-file\n$ git init && git add . && git commit -m \"Initial commit\" && cd ..\n\n# to intend to add files under sub1 and sub2, but submodules are added\n$ git add sub1/ sub2/\n$ git status\n# On branch master\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#\n#       new file:   sub1\n#       new file:   sub2\n#\n\n$ git rm --cached sub1 sub2\n\n# to intend add files under sub1, ok\n$ gtad sub1/\n$ git status\n# On branch master\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#\n#       new file:   sub1/sub1-file\n#\n# Untracked files:\n#   (use \"git add <file>...\" to include in what will be committed)\n#\n#       sub2/\n\n\nPing Yin\n"}]}