git clone 命令参数:
usage: git clone [options] [--] <repo> [<dir>] -v, --verbose be more verbose -q, --quiet be more quiet --progress force progress reporting -n, --no-checkout don't create a checkout --bare create a bare repository --mirror create a mirror repository (implies bare) -l, --local to clone from a local repository --no-hardlinks don't use local hardlinks, always copy -s, --shared setup as shared repository --recursive initialize submodules in the clone --recurse-submodules initialize submodules in the clone --template <template-directory> directory from which templates will be used --reference <repo> reference repository -o, --origin <name> use <name> instead of 'origin' to track upstream -b, --branch <branch> checkout <branch> instead of the remote's HEAD -u, --upload-pack <path> path to git-upload-pack on the remote --depth <depth> create a shallow clone of that depth --separate-git-dir <gitdir> separate git dir from working tree -c, --config <key=value> set config inside the new repository
参数挺多,但常用的就几个:
1. 最简单直接的命令
git clone xxx.git
2. 如果想clone到指定目录
git clone xxx.git "指定目录"
3. clone时创建新的分支替代默认Origin HEAD(master)
git clone -b [new_branch_name] xxx.git
4. clone 远程分支
git clone 命令默认的只会建立master分支,如果你想clone指定的某一远程分支(如:dev)的话,可以如下:
A. 查看所有分支(包括隐藏的) git branch -a 显示所有分支,如:
* master remotes/origin/HEAD -> origin/master remotes/origin/dev remotes/origin/master
B. 在本地新建同名的("dev")分支,并切换到该分支
git checkout -t origin/dev 该命令等同于: git checkout -b dev origin/dev
相关推荐
使用在linux操作系统上使用git clone下载github上模型速度慢,多数是因为网不好。 提供了两种方法,可以同时使用。 方法:先刷hosts 1. 命令行输入下列代码,找到 github.global.ssl.fastly.Net对应的Address,记录 ...
使用命令操作进行关联git,而不是eda软件操作git,操作相关文件,提交更新,拉取代码,包含git分支的操作
git clone命令将存储库克隆到新目录中。 将存储库克隆到新创建的目录中,为克隆的存储库中的每个分支创建远程跟踪分支,并从克隆检出的存储库作为当前活动分支的初始分支。 Git支持多协议,ssh://, http://, ...
2 下载远程项目的GIT库到本地[code]$ git clone git://远程Git库地址 filename[code] filename 是你本地的文件夹名字将远程库克隆到这个文件夹,此文件是自己建立的 3 常用命令 (1)git branch 查看本地分支
Git基本命令说明 3 Git如何将本地的项目上传到Git 20231102 5 1、 首先需要在git服务器中建立个工程 5 2、 在本地用git执行命令 5 Git新建一个project 6 Git clone带用户名和密码 7 Git checkout 忽略修改的文件 7 ...
4. 用```git clone A```正常克隆github仓库A(实际会克隆gitee的仓库B,以及一堆的submodule仓库) # git-replace具体说明 ## 功能说明 > 替换git命令, 以将: 1. clone的很慢的github仓库地址替换为预置国内...
从远程仓库克隆 :git clone [url] 本地仓库命令: git status:查看文件状态 git add [文件名]:将文件的修改加入暂存区 git reset [文件名]:将暂存区的文件取消暂存,或者切换到指定版本git reset --hard [版本号...
git分布式版本控制常用命令及其说明,Git连接远程仓库,向远程仓库推送($ git push 或 $ git push origin master)项目,从远程仓库拉取($ git clone 仓库地址https://....)项目
git视频教程.2.Git 命令 - git init、git clone.mp4 git视频教程.3.1.Git 命令 - git add、git status.mp4 git视频教程.3.2.Git 命令 - git diff、git difftool.mp4 git视频教程.3.3.Git 命令 - git commit.mp4 git...
通过shell命令克隆多个git仓库 安装 npm i git-clone-repos 用法 const clone = require ( 'git-clone-repos' ) ; ( async ( ) => { await clone ( [ 'git@github.com:alex-page/alexpage.com.au.git' , 'git@...
windows虽然可以直接下载android源码, 但由于没有repo工具,...这个工具可以实现批量处理git 命令,包括git clone, pull, checkout等等。 使用方法: 启动git bash, 输入python Gitbat.py -c "git clone" -e即可。
分布式相比于集中式的最大区别在于开发者可以提交到本地,每个开发者通过克隆(git clone),在本地机器上拷贝一个完整的Git仓库。 如图1所示是经典的git开发过程。 图1 图1 Git的功能特性: 从一般开发者的角度来看...
要克隆一个仓库,首先必须知道仓库的地址,然后使用git clone命令克隆。 $ git clone git@github.com:michaelliao/gitskills.git Git支持多种协议,包括https,但通过ssh支持的原生git协议速度最快。
git命令,部分如下: 创建与克隆 1.git init:在当前目录初始化 Git 仓库 2.git clone <url>:从远程 Git 仓库克隆一个本地副本 3.git remote add <name> <url>:给当前 Git 项目添加一个远程仓库 4.git pull:拉取...
git clone <#> 克隆一份代码到本地 git config --globa user.name/user.email # 修改全局的用户名称/邮箱 git checkout -b xxx # 基于当前分支创建xxx分支并切换到xxx分支 git checkout xxx # 切换到xxx...
git 常用命令使用教程 里面包含有 pull push clone checkout 分支等教程总结Xmind
$ git clone ssh://user@domain.com/repo.git Create a new local repository $ git init LOCAL CHANGES Changed files in your working directory $ git status Changes to tracked files $ git diff Add all ...
git常用命令总结 1 从远程服务克隆项目(git clone git@172 16 20 52:koodoo) 2 查看本地分支 3 查看远程分支 4 切换分支 5 从远程分支develop更新代码 6 合并develop分支到当前分支 7 上传本地代码到远程服务 8 ...
git clone加速命令行工具,使用加速镜像解决从github克隆速度慢的问题,支持git命令透传,可以只在需要clone的时候使用,也可以替代git作为日常使用。 安装 npm i wogit -g 使用 wogit的使用,除了支持几个指定特定...
通过 git clone 命令下载 nova,下载链接如下:运行命令:git clone https://github.com/openstack/nova.g