From: Junio C Hamano Date: Wed, 19 Dec 2012 17:43:30 GMT Subject: Re: [PATCH v8 3/3] submodule add: If --branch is given, record it in .gitmodules Message-ID: <7vhani9bul.fsf@alter.siamese.dyndns.org> In-Reply-To: <2c8df95b9f4cc9ceb9d6d96d5deac22320541dd9.1355932282.git.wking@tremily.us> wking@tremily.us writes: > From: "W. Trevor King" > > This allows you to easily record a submodule..branch option in > .gitmodules when you add a new submodule. With this patch, > > $ git submodule add -b [] > $ git config -f .gitmodules submodule..branch > > reduces to > > $ git submodule add -b [] > > This means that future calls to > > $ git submodule update --remote ... > > will get updates from the same branch that you used to initialize the > submodule, which is usually what you want. I agree that it would usually be what you want when you are using the --remote option. Will replace the previous round with this. Thanks.