2014/1/8 W. Trevor King <wking@xxxxxxxxxx>: > I also prefer 'checkout' to 'head', because 'checkout' > already exists in non-submodule Git for switching between local > branches. > Reasons I would loosely support 'git submodule checkout' -------------------------------------------------------------------------------- 1) It's true that 'git submodule checkout' would also often run 'git checkout'. Reasons, as an user, I seriously would *not* like 'git submodule checkout' ----------------------------------------------------------------------------------------------------- 1) 'git submodule checkout' would also touch '.git/config' and '.gitmodules', and I don't like much the idea of a 'checkout' command touching config files. It looks dirty. 2) Having 'git checkout', 'git checkout --recurse-submodules' and finally 'git submodule checkout' is too much for me. Also, in my proposal, 'git submodule [tobedecided] --attach' would also merge orphaned commits by default, and 'checkout' is not about merge. Reasons I would fervently support 'git submodule head' ---------------------------------------------------------------------------- 1) It tells immediately that this command is about HEAD of the submodule, and will take care of it. Newcomers would loveit if they don't like their HEAD state; 2) "head" is unspecific enough to admit it can also touch '.git/config' and '.gitmodules'. Said this, it seems Heiko[1] proposed a similar syntax and the only difference was about names, not behavior of the command to be added (if we eventually take this path, ofc). > On Wed, Jan 08, 2014 at 01:17:49AM +0100, Francesco Pretto wrote: >> # Attach the submodule HEAD to <branch>. >> # Also set ".git/config" 'submodule.<module>.branch' to <branch> >> $ git submodule head -b <branch> --attach <module> > > I prefer submodule.<name>.local-branch for the submodule's local > branch name. I think this was still part of your original misunderstanding about my "git submodule head". This command would touch 'branch' property anyway because '-b <branch>' would still be the remote branch, even in the case you have a 'local-branch' property (maybe to be coupled here with a --local-branch <local-branch> switch). Greetings, Francesco [1] http://marc.info/?l=git&m=138913435216349&w=2 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html