{"thread":{"id":"55172","subject":"git subtree pull vs git pull","startedAt":"2021-02-18T19:59:10Z","lastAt":"2021-02-18T19:59:10Z","messageCount":1,"participants":["Sven R. Kunze"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"417348","messageId":"988c57dd-58dc-8ec7-7b00-60313473277c@mail.de","threadId":"55172","inReplyTo":null,"subject":"git subtree pull vs git pull","fromName":"Sven R. Kunze","fromEmail":"srkunze@mail.de","sentAt":"2021-02-18T19:49:28Z","receivedAt":"2021-02-18T19:59:10Z","isPatch":false,"sender":{"key":"srkunze@mail.de","avatar":null},"body":"Hey everyone,\n\nthat's my first question here, so please bare with me. I got an \nunexplained behavior using git-subtree.\n\n\nPlease consider (git --version := 2.30.0):\n\nme@host:~/repo$ git status\nOn branch master\nYour branch is up to date with 'origin/master'.\n\nChanges not staged for commit:\n   (use \"git add <file>...\" to update what will be committed)\n   (use \"git restore <file>...\" to discard changes in working directory)\n         modified: somechanges\n\nno changes added to commit (use \"git add\" and/or \"git commit -a\")\n\nme@host:~/repo$ git pull --no-rebase\nAlready up to date.\n\nme@host:~/repo$ git subtree pull --prefix=prefix/ subtree-origin master\nWorking tree has modifications.  Cannot add.\n\n\nMy expectation would be that I can pull the subtree as I could pull the \nmain repo without any issue. The subtree does not even touch the \nmodified file.\n\nIs there a reason for this or can this restriction be lifted?\n\nWhere am I coming from? The work-around would be \"git stash, git subtree \npull, git stash pop\" which would work on a first glance, but other tools \nlike IDEs lose their context information regarding these changes (e.g. \nchangelists). This can be a little bit annoying given that mostly there \nare not changes at the subtree-origin.\n\nBest regards,\nSven\n\n"}]}