submodule questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I've been trying to understand git submodules.

1) What is the purpose for the submodule lines in .git/config?
2) should 'git submodule sync' update the .git/config with submodule
info, or what exactly does 'git submodule sync' do?

I read the following:
http://therealadam.com/archive/2008/05/08/changing-git-submodule-urls/
 The author claims that:

    * Fork/create your own version of the submodule in question
    * Change the URL for the submodule in .git/config and .gitmodules
    * Cross your fingers and hope for the best

Does not work, but in my experience it does.  On machine #1, I did the
following:

1) created a new branch in the submodule dir, pushed the changes to a new repo.
2) modified .gitmodules to point to the new repo
3) push the changes in the parent repo

On Machine #2:

1) git pull
2) git submodules sync
3) git submodules update

Everything seemed to work.  However, the .git/config submodule entry
still points to the old location, even though 'git submodule update'
seemed to work.  Hence my confusion about what .git/config submodule
entries are for.

Thanks,
Cliff
--
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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]