git clone 一些简单笔记
2016-08-05 20:52
387 查看
自使用了git后,就彻底喜欢上了,深深体会到了自由的感觉,记录一些简单的笔记和使用心得,仅供留迹,以备后查。。。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.git2. 如果想clone到指定目录
git clone xxx.git "指定目录"3. clone时创建新的分支替代默认Origin HEAD(master)
git clone -b [new_branch_name] xxx.git4. clone 远程分支 git clone 命令默认的只会建立master分支,如果你想clone指定的某一远程分支(如:dev)的话,可以如下: A. 查看所有分支(包括隐藏的) git branch -a 显示所有分支,如:
* master remotes/origin/HEAD -> origin/master remotes/origin/dev remotes/origin/masterB. 在本地新建同名的("dev")分支,并切换到该分支
git checkout -t origin/dev 该命令等同于: git checkout -b dev origin/dev
from: http://www.cnblogs.com/yaoshan/archive/2013/01/10/2854281.html[/code]
相关文章推荐
- git clone 一些简单笔记
- git clone 一些简单笔记
- github 学习笔记1--一些简单的git命令
- git的一些简单命令(git clone,git branch,git checkout。。。)
- git基本操作的一些实用笔记
- Ubuntu中安装MongoDB及执行一些简单操作笔记
- 项目管理---git----快速使用git笔记(一)------git的简单介绍
- 机器学习&数据挖掘笔记_15(关于凸优化的一些简单概念)
- git的一些简单使用
- Linux学习笔记(四)---centos7系统安装后的一些简单操作
- git的一些简单用法
- cpp学习笔记 1一个简单的小程序以及一些的知识点
- git 学习的简单笔记
- Ubuntu中安装MongoDB及执行一些简单操作笔记
- git 常用的一些笔记
- GIT入门笔记(3)- git中的一些概念和原理
- git学习笔记(二) git的一些设置和辅助功能
- 简单的git clone后让git push命令不再需要密码
- 一些简单但是常见的算法题目(笔记类)
- 项目管理---git----快速使用git笔记(一)------git的简单介绍