场景:已存在的项目目录,设置git信息
方法一:
git clone https://myrepo.com/git.git temp mv temp/.git code/.git rm -rf temp
方法二:
git init git remote add origin $url_of_clone_source git fetch origin git checkout -b master --track origin/master # origin/master is clone's default
参考资料:http://stackoverflow.com/questions/5377960/whats-the-best-practice-to-git-clone-into-an-existing-folder
原创文章,转载请注明:转载自Web开发笔记 | 已存在文件的项目设置远程Git
本文链接地址:https://www.magentonotes.com/git-clone-into-an-existing-folder.html
Comments on this entry are closed.