如何克隆名为myproject
的存储库?
服务器目录使用智能的https
命名为一个唯一代码,例如584ffceed.git
。 如何设置权限以要求用户名和密码并授予推送或拉取权限?
myproject
,只需执行git clone ... / 584ffceed.git myproject
。git clone clone_url.git project_name
来自 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.
这是紧跟着仓库URI的<directory>参数。
git clone
-> https://git-scm.com/docs/git-clone - myselfmiqdad