Re: [git-users] git config fetch.recurseSubmodules true && git pull doesn't update the submodule
On Wed, 26 Dec 2012 21:47:42 +0800 lei yang wrote: [...] > >> git config alias.pullall '!git pull && git submodule update --init > >> --recursive' > it works with git pullall > >> but I don't know how let it work with "git pull" > >> git config alias.pull '!git pull && git submodule update --init > >> --recursive' ---> by remove "all" it doesn't work > > > > I don't know for sure, but it seems Git aliases do not override > > built-in commands, and I think this is an obviously right thing. > > I see no problem with using `git pullall` to do what you need > > instead of trying to *override* the default. If "pullall" is too > > long-winded for you, make it "pa" instead. > > Thanks for the reply.Good question > > Because I want to put a submodule in tree, but others may NOT know > this, they often do "git pull" to update. > and don't know it has a submodule there. I don't want to introduce > trouble I don't get your point. Git aliases can be stored in three places: a repository's configuration, per-user configuration (dubbed "global") and system-wide configuration. In either case, aliases never cross the repository's boundaries, that is, they are not pushed (there's simply no support for pushing/pulling configuration in Git, in contrast with Fossil, for instance). So even if you create a system-wide alias, it could be only used by the users of your computer, and they can freely override this alias with their own version (on the two remaining levels of configuration storage). So your problem appears to be a pure "policy" problem: just create a document describing the repository layout and its dependencies and specify what steps the users of your repository are supposed to carry out to get all the necessary dependencies and to update them afterwards; then publish this document somewhere (possibly in the repository itself, which is customary for the projects hosted on github as their README.md file is automatically rendered and displayed on the project's web page). Then make sure to communicate this policy and the location of its description to your users. --
Re: [git-users] git config fetch.recurseSubmodules true && git pull doesn't update the submodule
On Wed, Dec 26, 2012 at 4:57 AM, Konstantin Khomoutov wrote: > On Wed, 26 Dec 2012 12:49:43 +0800 > lei yang wrote: > >> I want others when they "git pull" it also update the submoudles .but >> below two ways don't work for me >> >> 1) >> git config fetch.recurseSubmodules true && git pull >> >> 2) >> git config alias.pullall '!git pull && git submodule update --init >> --recursive' > it works with git pullall >> but I don't know how let it work with "git pull" >> git config alias.pull '!git pull && git submodule update --init >> --recursive' ---> by remove "all" it doesn't work > > I don't know for sure, but it seems Git aliases do not override > built-in commands, and I think this is an obviously right thing. > I see no problem with using `git pullall` to do what you need instead > of trying to *override* the default. If "pullall" is too long-winded > for you, make it "pa" instead. Thanks for the reply.Good question Because I want to put a submodule in tree, but others may NOT know this, they often do "git pull" to update. and don't know it has a submodule there. I don't want to introduce trouble Lei --
Re: [git-users] git config fetch.recurseSubmodules true && git pull doesn't update the submodule
On Wed, Dec 26, 2012 at 8:57 PM, Konstantin Khomoutov wrote: > On Wed, 26 Dec 2012 12:49:43 +0800 > lei yang wrote: > >> I want others when they "git pull" it also update the submoudles .but >> below two ways don't work for me >> >> 1) >> git config fetch.recurseSubmodules true && git pull >> >> 2) >> git config alias.pullall '!git pull && git submodule update --init >> --recursive' > it works with git pullall >> but I don't know how let it work with "git pull" >> git config alias.pull '!git pull && git submodule update --init >> --recursive' ---> by remove "all" it doesn't work > > I don't know for sure, but it seems Git aliases do not override > built-in commands, and I think this is an obviously right thing. > I see no problem with using `git pullall` to do what you need instead > of trying to *override* the default. If "pullall" is too long-winded > for you, make it "pa" instead. Thanks for the reply.Good question Because I want to put a submodule in tree, but others may NOT know this, they often do "git pull" to update. and don't know it has a submodule there. I don't want to introduce trouble Lei --
Re: [git-users] git config fetch.recurseSubmodules true && git pull doesn't update the submodule
On Wed, 26 Dec 2012 12:49:43 +0800 lei yang wrote: > I want others when they "git pull" it also update the submoudles .but > below two ways don't work for me > > 1) > git config fetch.recurseSubmodules true && git pull > > 2) > git config alias.pullall '!git pull && git submodule update --init > --recursive' > it works with git pullall > but I don't know how let it work with "git pull" > git config alias.pull '!git pull && git submodule update --init > --recursive' ---> by remove "all" it doesn't work I don't know for sure, but it seems Git aliases do not override built-in commands, and I think this is an obviously right thing. I see no problem with using `git pullall` to do what you need instead of trying to *override* the default. If "pullall" is too long-winded for you, make it "pa" instead. --