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
相关推荐
使用命令操作进行关联git,而不是eda软件操作git,操作相关文件,提交更新,拉取代码,包含git分支的操作
git 常用命令使用教程 里面包含有 pull push clone checkout 分支等教程总结Xmind
使用在linux操作系统上使用git clone下载github上模型速度慢,多数是因为网不好。 提供了两种方法,可以同时使用。 方法:先刷hosts 1. 命令行输入下列代码,找到 github.global.ssl.fastly.Net对应的Address,记录 ...
Git开发操作流程v1.0 Git使用笔记 目录: Git开发操作流程 2 1. 新建分支 2 # 1-查看当前git状态 2 # 2-若不在主分支master,则切换至主分支 2 # 3-更新主干代码,确保本地仓库与远程同步 2 # 5-推送至远程仓库 2 2. ...
2 下载远程项目的GIT库到本地[code]$ git clone git://远程Git库地址 filename[code] filename 是你本地的文件夹名字将远程库克隆到这个文件夹,此文件是自己建立的 3 常用命令 (1)git branch 查看本地分支
分布式相比于集中式的最大区别在于开发者可以提交到本地,每个开发者通过克隆(git clone),在本地机器上拷贝一个完整的Git仓库。 如图1所示是经典的git开发过程。 图1 图1 Git的功能特性: 从一般开发者的角度来看...
# 使用步骤: 0. 本工具只支持:git版本 1. 利用gitee gitcode等平台,手工将 目标github仓库A 拉为 gitee等仓库B 2. repo_map.py中填入A B对应,以及A的submodule仓库对应的 gitee仓库 3. (windows下打开"git ...
git clone加速命令行工具,使用加速镜像解决从github克隆速度慢的问题,支持git命令透传,可以只在需要clone的时候使用,也可以替代git作为日常使用。 安装 npm i wogit -g 使用 wogit的使用,除了支持几个指定特定...
从远程仓库克隆 :git clone [url] 本地仓库命令: git status:查看文件状态 git add [文件名]:将文件的修改加入暂存区 git reset [文件名]:将暂存区的文件取消暂存,或者切换到指定版本git reset --hard [版本号...
git clone命令将存储库克隆到新目录中。 将存储库克隆到新创建的目录中,为克隆的存储库中的每个分支创建远程跟踪分支,并从克隆检出的存储库作为当前活动分支的初始分支。 Git支持多协议,ssh://, http://, ...
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 config --globa user.name/user.email # 修改全局的用户名称/邮箱 git checkout -b xxx # 基于当前分支创建xxx分支并切换到xxx分支 git checkout xxx # 切换到xxx...
Windows git 下载文件,版本为2.39.0.2,使用x64位系统 git 常用命令 git clone 拉取代码仓库 ...(小知识,在git clone时使用ssh会更快,如 git clone git@github.com:qzrobotsnake/minecraftClient.git)
$ 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 init:在当前目录初始化 Git 仓库 2.git clone <url>:从远程 Git 仓库克隆一个本地副本 3.git remote add <name> <url>:给当前 Git 项目添加一个远程仓库 4.git pull:拉取...
如果你只是想要将gitee或者github上面的项目克隆下来,那么你只需要下载安装git软件,然后拿到想要项目的仓库地址,直接新建一个文件夹,git bash 然后输入命令,git clone仓库地址即可 希望我的内容有帮助到你。
git常用命令总结 1 从远程服务克隆项目(git clone git@172 16 20 52:koodoo) 2 查看本地分支 3 查看远程分支 4 切换分支 5 从远程分支develop更新代码 6 合并develop分支到当前分支 7 上传本地代码到远程服务 8 ...