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

shr*_*oel 1 git git-clone

如何克隆名称存储库myproject

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

小智 9

以这种方式克隆存储库:

git clone clone_url.git project_name
Run Code Online (Sandbox Code Playgroud)


Vam*_*ire 8

要克隆成myproject只做git clone .../584ffceed.git myproject.

关于你的另一个问题,你所要求的并不是很清楚.请重新说明问题以明确说明.


sma*_*ber 5

来自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.
Run Code Online (Sandbox Code Playgroud)

它是直接放在存储库 URI 之后的参数 <directory>。