What's the best practice to “git clone” into an existing folder?

后端 未结 15 1688
情书的邮戳
情书的邮戳 2020-11-28 17:19

I have a working copy of the project, without any source control meta data. Now, I\'d like to do the equivalent of git-clone into this folder, and keep my local changes.

15条回答
  •  眼角桃花
    2020-11-28 17:50

    To clone a git repo into an empty existing directory do the following:

    cd myfolder
    git clone https://myrepo.com/git.git . 
    

    Notice the . at the end of your git clone command. That will download the repo into the current working directory.

提交回复
热议问题