在克隆过程中更改文件夹名称
当我克隆某些内容时,它会在我的计算机上创建一个与应用程序同名的文件夹。
例如,执行此克隆会创建一个长“sign-in-with-twitter”文件夹:
git clone https://github.com/sferik/sign-in-with-twitter.git
有没有办法指定自定义名称?
When I clone something, it creates a folder with the same name as the app on my computer.
For example, doing this clone creates a long "sign-in-with-twitter" folder:
git clone https://github.com/sferik/sign-in-with-twitter.git
Is there a way to specify a custom name?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可以执行以下操作:
请参阅此处的手册
You can do this:
refer to the manual here
将位于 Repo 的存储库克隆到本地计算机上名为 DestinationDirectory 的文件夹中。
Clone the repository located at Repo into the folder called DestinationDirectory on the local machine.
如果您只想克隆特定分支,那么,
例如,
In case you want to clone a specific branch only, then,
for example,
这是 @Marged 在评论中的另一个答案
从您创建的文件夹运行下面的命令
Here is one more answer from @Marged in comments
Run the command below from the folder you created
到达这里是因为我的源存储库中有
%20
,它在使用简单的git clone
时创建了包含%20
的本地文件夹>。简单的解决方案:
git clone https://teamname.visualstudio.com/Project%20Name/_git/Repo%20Name“Repo Name”
Arrived here because my source repo had
%20
in it which was creating local folders with%20
in them when using simplisticgit clone <url>
.Easy solution:
git clone https://teamname.visualstudio.com/Project%20Name/_git/Repo%20Name "Repo Name"