How do I clone into a non-empty directory?

前端 未结 16 1526
庸人自扰
庸人自扰 2020-11-22 06:20

I have directory A with files matching directory B. Directory A may have other needed files. Directory B is a git repo.

I want to clone directory B to directory A bu

16条回答
  •  不要未来只要你来
    2020-11-22 06:31

    Here's what I ended up doing when I had the same problem (at least I think it's the same problem). I went into directory A and ran git init.

    Since I didn't want the files in directory A to be followed by git, I edited .gitignore and added the existing files to it. After this I ran git remote add origin '' && git pull origin master et voíla, B is "cloned" into A without a single hiccup.

提交回复
热议问题