Git clone命令使用详解
来源:互联网 发布:人工智能技术及应用 编辑:程序博客网 时间:2024/04/26 18:56
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
0 0
- Git clone命令使用详解
- git clone命令详解
- git clone命令使用
- 无法使用git clone 命令
- git clone命令详解(一)
- git clone,push,pull,fetch命令详解
- git clone,push,pull,fetch命令详解
- Git Clone命令直接使用用户名密码Clone
- git clone 命令参数:
- Git clone 命令
- git clone命令
- git命令之clone
- git clone -s详解
- git clone,push,pull,fetch命令详解。(转载)
- GIT命令 clone remote fetch pull push 的使用
- git clone远程分支详解
- Git命令详解-个人使用
- git命令之git clone用法
- 实现ios常见菜单效果的思路
- 冒泡排序
- Phone List - HDU 1671 Trie树
- 黑马程序员_File类
- 【索引】Numerical Methods::Exercises: Beginner
- Git clone命令使用详解
- 在屏幕上未看到创建的视图
- memset, string, 段错误?---谈谈我遇到的memset误用
- Bound Services
- 初学制作计算器 m+ m- mc 等没有实现 等后期优化 因为初学 所以代码不好 见谅
- strcpy和memcpy的区别
- [JavaScript]-----匿名函数与闭包
- 演讲大厅安排
- AMQP协议一