2015-03-02 20:43:44 +00:00
|
|
|
[Git submodules](http://git-scm.com/book/en/v2/Git-Tools-Submodules) are
|
|
|
|
supported by git-annex since version 5.20150303.
|
|
|
|
|
|
|
|
Git normally makes a `.git` **file** in a
|
|
|
|
submodule, that points to the real git repository under `.git/modules/`.
|
|
|
|
This presents problems for git-annex. So, when used in a submodule,
|
|
|
|
git-annex will automatically replace the `.git` file with a symlink
|
2015-03-04 20:08:41 +00:00
|
|
|
pointing at the git repository. (When the filesystem doesn't support
|
2019-08-26 18:52:55 +00:00
|
|
|
symlinks, an adjusted unlocked branch is used, and submodules are
|
|
|
|
supported in that setup too.)
|
2015-03-02 20:43:44 +00:00
|
|
|
|
|
|
|
With that taken care of, git-annex should work ok in submodules. Although
|
|
|
|
this is a new and somewhat experimental feature.
|
|
|
|
|
|
|
|
The conversion of .git file to .git symlink mostly won't bother git.
|
|
|
|
|
|
|
|
Known problems:
|
|
|
|
|
|
|
|
* If you want to delete a whole submodule, `git rm submodule`
|
|
|
|
will refuse to delete it, complaining that the
|
|
|
|
submodule "uses a .git directory". Workaround: Use `rm -rf`
|
|
|
|
to delete the tree, and then `git commit`.
|