{"thread":{"id":"38069","subject":"Force git submodule update --remote for some branches","startedAt":"2014-11-28T17:54:57Z","lastAt":"2014-11-30T14:52:32Z","messageCount":2,"participants":["Timothy M. Redaelli","Jens Lehmann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"252668","messageId":"5478B6F1.6070200@gmail.com","threadId":"38069","inReplyTo":null,"subject":"Force git submodule update --remote for some branches","fromName":"Timothy M. Redaelli","fromEmail":"timothy.redaelli@gmail.com","sentAt":"2014-11-28T17:54:57Z","receivedAt":"2014-11-28T17:54:57Z","isPatch":false,"sender":{"key":"timothy.redaelli@gmail.com","avatar":null},"body":"Hi,\nI have a repository with a submodule and I'd like to force git to\ncheckout the LAST version of the submodule and not the stored one (like\ngit submodule update --remote), but only on some branches and without\nthe need to remember to add --remote every time you are on this branch.\n\nIs there any way to do it? Maybe using .gitmodules?\n\nThanks\n\n-- \nTimothy M. Redaelli\nArch Linux Trusted User\n\n"},{"id":"252747","messageId":"547B2F30.8090003@web.de","threadId":"38069","inReplyTo":"5478B6F1.6070200@gmail.com","subject":"Re: Force git submodule update --remote for some branches","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2014-11-30T14:52:32Z","receivedAt":"2014-11-30T14:52:32Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 28.11.2014 um 18:54 schrieb Timothy M. Redaelli:\n> I have a repository with a submodule and I'd like to force git to\n> checkout the LAST version of the submodule and not the stored one (like\n> git submodule update --remote), but only on some branches and without\n> the need to remember to add --remote every time you are on this branch.\n>\n> Is there any way to do it? Maybe using .gitmodules?\n\nNot yet.\n\nBut yes, .gitmodules would be the right place to put such a\nconfiguration as then it would be per submodule and also per\n(superproject-)branch.\n\nBy the way, what do you think the output of git status and\ngit diff should look like when you updated a submodule to\nits branch tip which differs from the commit recorded in\nthe superproject? Should these changes be displayed or not?\nAnd only if the new tip is a fast-forward of the old or\nalways?\n"}]}