[英]GIT Delete Repository and clone on local machine
I have a branch called *master on the local machine 我在本地计算机上有一个名为* master的分支
and I have three repositories called: 我有三个存储库:
On this local machine, there is a lot of problems with files, out of sync, etc. the decision has been made to just delete the /site directory and re -clone this from master. 在此本地计算机上,文件存在很多问题,不同步等。已决定仅删除/ site目录并从master重新克隆此目录。 I am unsure how to do this. 我不确定该怎么做。
通常,简单地rm -rf /my/git/repo
然后git clone <wherever I want to clone from> /my/new/git/repo
I think this is what you want - 我想这就是你想要的-
$ rm -fr /git/site
$ mkdir /git/site && cd /git/site
$ git init
$ git remote add origin git@github.com/org/repo.git
$ git pull origin master
your /git/site
will now be reset to your master branch. 您的/git/site
现在将重置为您的master分支。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.