Git & external backup. Subdirectory is empty, I'd rather it not be.

独自空忆成欢 提交于 2019-12-02 10:16:21
VonC

Submodules are repos recorded in a parent repo as gitlinks (special entries in the index, mode 160000), that is as the exact SHA1 represented by that submodule repo.

The goal is not just to include a subrepo, but to include a specific version of that repo (hence the gitlink, to record the right SHA1 to which that subrepo should be checked out).

In your backup-script scenario, you should go in each submodule, and backup in their own bare repo on your external drive.

You will find the path of those submodules in your .gitmodules file in the main repo.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!