自使用了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.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 显示所有分支,如:    

* masterremotes/origin/HEAD -> origin/masterremotes/origin/devremotes/origin/master

  B.  在本地新建同名的("dev")分支,并切换到该分支

git checkout -t origin/dev 该命令等同于:git checkout -b dev origin/dev

from: http://www.cnblogs.com/yaoshan/archive/2013/01/10/2854281.html

git clone 一些简单笔记相关推荐

  1. git的一些简单命令(git clone,git branch,git checkout。。。)

    1.git clone 命令 $ git clone <版本库的网址> 比如,克隆jQuery的版本库. $ git clone https://github.com/jquery/jqu ...

  2. git仓库的简单使用

    笔记内容:git仓库的简单使用 笔记日期:2018-01-12 22.5/22.6 单机上使用git 22.7 建立远程仓库 22.8 克隆远程仓库 22.5/22.6 单机上使用git git是分布 ...

  3. git clone 分支_Git 小团队的协作 (二)

    小团队如何利用git协作开发呢?对此我想总结一下自己的经验,#幸福里精装房选房指南# 也算是记个笔记吧.我想通过情景设定的方式,通俗易懂的解释效果会更好一点,也比较贴近实际开发过程. 在创建仓库时分好 ...

  4. git init和git clone获取仓库 (一)

    文章目录 使用git init和git clone获取git仓库 1 git init 在本地目录上创建Git仓库 2 git clone 从已有的Git存储数据库中克隆仓库到本地目录 3 导航页 使 ...

  5. Git超详细学习笔记 手把手带你一步一步操作 -- 详细分析git 对象-域-分支以及github使用

    Git 使用笔记 详细的说明文档: 请参考安装目录下的doc文档 D:\Program Files\Git\mingw64\share\doc\git-doc\git-stash.html git 版 ...

  6. Git命令配置学习笔记

    Git 笔记 Git是分布式版本控制系统 集中式VS分布式: 集中式版本控制系统,版本库集中存放在中央服务器,必须要联网才能工作,没有历史版本库. 分布式版本控制系统,版本控制系统没有"中央 ...

  7. git clone一个github上的仓库非常缓慢 和 github网页打不开

    git clone一个github上的仓库非常缓慢,简单快捷的方法解决git下载缓慢问题 文章目录: 1 问题描述 2 解决git clone下载速度缓慢问题 2.1 使用github的镜像网站 (亲 ...

  8. git clone错误 fatal: early EOF fatal: index-pack failed

    最后用ssh的方式解决了,不用http https://blog.csdn.net/fastjack/article/details/79757520 用了以下的方法还是不行 今天想 clone 一下 ...

  9. 学习 git clone 几种不同的协议

    当我们去github上克隆代码仓库的时候,一般有两种选择,一种是https协议,一种是ssh协议.这也是最常用的两种协议了. 1. HTTPS协议(推荐) 优点: 对新手友好,使用简单,clone的时 ...

最新文章

  1. 基于.net技术的代码高亮显示组件
  2. Python:执行精确的浮点数运算
  3. POJ - 2175 Evacuation Plan(最小费用最大流+消圈定理)
  4. coordinatorlayout_一篇文章学会Coordinatorlayout+AppbarLayout
  5. 响应式web之@media screen
  6. linux内核通俗理解,简洁明了!高手带你理解ARM-Linux的启动过程
  7. apache2 html文件夹,需要与我的Apache2网站配置文件
  8. R语言| 中介效应分析,Mediation包和BruceR包,循环Process函数
  9. 有关ERP、OA的认识学习
  10. http协议服务器错误代码稍后再试,Http协议常见错误码说明解析
  11. WordPress收费下载插件Erphpdown最新下载[持续更新]
  12. 物联网、大数据和云计算的关系
  13. Elasticsearch 多字段查询 best_fields、most_fields、cross_fields,傻傻分不清楚?
  14. whale 帷幄:crm客户管理营销系统全称是什么
  15. HIVE 列转行 字段分组截取随笔#collect_list/collect_set
  16. weui icon图标大全
  17. Android闹钟APP
  18. 【交互式用户流程与演示设计】上海道宁与​Overflow让您能更自信的展示您的设计
  19. 关于电脑自带的微软拼音输入法变成繁体的操作方法
  20. 怎样防止ddos攻击呢?

热门文章

  1. 【图数据库】Window下的安装Neo4j
  2. AlphaGo已经拿下围棋,创投界的“Master”何时出现?
  3. Presto实现原理和美团的使用实践
  4. 算法与数据结构(冒泡排序,选择排序和插入排序的总结)
  5. 深入理解分布式技术 - Redis 分布式锁解决方案
  6. Spring5源码 - 06 Spring Bean 生命周期流程 概述 01
  7. Linux-编写Shell的几个技巧
  8. Maven安装和配置及使用方法
  9. c语言入口及出口参数说明,麻烦帮忙指出一下这个函数的入口参数和出口参数呀!...
  10. java集合使用_java集合使用初步