Adding Git Remote to Different Directory

后端 未结 2 667
走了就别回头了
走了就别回头了 2021-01-13 18:57

So I am writing a script that initializes a git repository in ~/.cfi, adds a remote, and pulls it down from the server.

Creating the directory, and init

2条回答
  •  逝去的感伤
    2021-01-13 19:38

    git itself has parameters --git-dir for the .git directory and --work-tree for your working copy:

    git --git-dir /where/ever remote add ...
    

提交回复
热议问题