From: Jānis Rukšāns Date: Mon, 24 Aug 2015 17:53:15 GMT Subject: Re: Submodule, subtree, or something else? Message-ID: <1440438795.32140.98.camel@gmail.com> In-Reply-To: On P , 2015-08-24 at 09:51 -0700, Stefan Beller wrote: > IIUC, the second command will lookup the submodules in $(pwd), but if > they are not there they are skipped, so all of the existing submodules > are cloned. > Why do you need more submodules in the tmp clone than in > $(pwd)/projectA would be my next question. But I see your point now. The $(pwd) was just an example to illustrate my point. The actual use case is that I would be hacking on something at work, notice that it is already late and I have to catch the last bus home, yet I don't want to postpone whatever I was working on until the next day. So I would do git commit -a -m "[WIP] Stuff, finish at home" to save my work so far, go home, and clone / fetch it over ssh. Another important factor is that a lot of our code can be meaningfully tested only on the actual hardware, and is built in a VM. Quite often getting things right involve many iterations of hack hack hack, git commit --amend, fetch && reset --hard in the VM, build, test, repeat. Being able to clone / fetch directly from the copy I am working on makes it a lot easier. As I wrote in the other e-mail, I managed to achieve the desired result by using ./ (without .git suffix) as the submodule URL, and creating a file named in the bare repo with 'gitdir: ../' as it's contents, but I'm not sure whether it is a good idea or not. Jānis