git: How do you add an external directory to the repository?

前端 未结 8 1850
旧巷少年郎
旧巷少年郎 2020-12-02 10:16

I want to add an external directory to an existing repository.

External Dir: /home/some/directory

Working Dir: /htdocs/.git

If I attempt the followin

8条回答
  •  猫巷女王i
    2020-12-02 11:03

    Add a symbolic link to the directory within the repository. Then, add the same.

    ln -s /home/some/directory/
    git add directory
    

提交回复
热议问题