使用其他名称克隆Git存储库

时间:2017-02-10 13:37:16

标签: git git-clone

如何克隆名为myproject的存储库?

服务器目录使用智能584ffceed.git的唯一代码https命名。如何设置要求输入用户名和密码的权限并授予推送或拉取权限?

3 个答案:

答案 0 :(得分:8)

要克隆到myproject,只需执行git clone .../584ffceed.git myproject

关于你的其他问题,你所要求的并不是很清楚。请重新说明问题以明确说明。

答案 1 :(得分:1)

以这种方式克隆存储库:

git clone clone_url.git project_name

答案 2 :(得分:1)

来自man git-clone

   git clone [--template=<template_directory>]
             [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
             [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
             [--dissociate] [--separate-git-dir <git dir>]
             [--depth <depth>] [--[no-]single-branch]
             [--recursive | --recurse-submodules] [--[no-]shallow-submodules]
             [--jobs <n>] [--] <repository> [<directory>]

<directory>
           The name of a new directory to clone into.
           The "humanish" part of the source repository is used if no directory is explicitly given (repo for /path/to/repo.git and foo for
           host.xz:foo/.git).
           Cloning into an existing directory is only allowed if the directory is empty.

这是参数&lt; directory&gt;直接放在存储库URI之后。