在克隆过程中更改文件夹名称

发布于 2024-12-22 07:08:47 字数 197 浏览 0 评论 0原文

当我克隆某些内容时,它会在我的计算机上创建一个与应用程序同名的文件夹。

例如,执行此克隆会创建一个长“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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

折戟 2024-12-29 07:08:47

您可以执行以下操作:

git clone https://github.com/sferik/sign-in-with-twitter.git signin

# or

git clone [email protected]:sferik/sign-in-with-twitter.git signin

请参阅此处的手册

You can do this:

git clone https://github.com/sferik/sign-in-with-twitter.git signin

# or

git clone [email protected]:sferik/sign-in-with-twitter.git signin

refer to the manual here

累赘 2024-12-29 07:08:47
git clone <Repo> <DestinationDirectory>

将位于 Repo 的存储库克隆到本地计算机上名为 DestinationDirectory 的文件夹中。

git clone <Repo> <DestinationDirectory>

Clone the repository located at Repo into the folder called DestinationDirectory on the local machine.

谁对谁错谁最难过 2024-12-29 07:08:47

如果您只想克隆特定分支,那么,

git clone -b <branch-name> <repo-url> <destination-folder-name>

例如,

git clone -b dev https://github.com/sferik/sign-in-with-twitter.git signin

In case you want to clone a specific branch only, then,

git clone -b <branch-name> <repo-url> <destination-folder-name>

for example,

git clone -b dev https://github.com/sferik/sign-in-with-twitter.git signin
岁月蹉跎了容颜 2024-12-29 07:08:47

这是 @Marged 在评论中的另一个答案

  1. 创建一个具有您想要的名称的文件夹
  2. 从您创建的文件夹运行下面的命令

    git clone <在线存储库的路径> 。
    

Here is one more answer from @Marged in comments

  1. Create a folder with the name you want
  2. Run the command below from the folder you created

    git clone <path to your online repo> .
    
眼中杀气 2024-12-29 07:08:47

到达这里是因为我的源存储库中有 %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 simplistic git clone <url>.

Easy solution:

git clone https://teamname.visualstudio.com/Project%20Name/_git/Repo%20Name "Repo Name"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文