Is it possible to have a git repo inside another git repo

前端 未结 3 761
孤城傲影
孤城傲影 2020-12-14 12:24

I have a django project managed with git. I am git pushing it to my host. Now, I want to be able to push just one of the directories (inc. all sub dirs) to another git repo.

3条回答
  •  生来不讨喜
    2020-12-14 12:39

    When you make changes to a particular directory, stage those changes and commit and push, you are effectively "pushing" just that directory.

    If the other Git repo has only the directory you want to push, and that is why you want to have it as a repo in itself, you can look at Git Submodules.

提交回复
热议问题