/********************************************************************
* git clone all branch and create a empty branch
* 说明:
* git克隆所有分支、创建空分支,这个还是挺常用的。
*
* 2017-6-2 深圳 龙华樟坑村 曾剑锋
*******************************************************************/ 一、参考文档:
. 【Git】创建一个空分支
http://blog.csdn.net/zs634134578/article/details/9183705
. 怎么用git clone 远程的所有分支
http://www.jianshu.com/p/0fe715a7fbb3 二、克隆远程所有分支:
. 克隆仓库:
git clone git://example.com/myproject
. 查看分支:
git branch
. 查看所有分支:
git branch -a
. 创建分支:
. git checkout -b feature origin/feature
. git checkout -t origin/feature 三、创建空分支:
. 创建分支:
git checkout --orphan <your branch name>
. 删除当前分支下所有的文件:
git rm -rf .
. 查看当前分支,一般是不存在的:
git branch -a
. 编写内容,添加内容到当前分支:
git add .
. 提交分支:
git commit

git clone all branch and create a empty branch的更多相关文章

  1. git 学习笔记2--How to create/clone a repository

    1. create/clone 1.1 create 针对已经存在的目录创建一个repository,使用以下命令: git init Initialized empty Git repository ...

  2. git clone远程branch和tag

    1.查看远程分支 git branch -r 2.测试git clone romete,只是clone远程remote的master,不会clone其他的目录 -------------------- ...

  3. git clone指定branch或tag

    git clone指定branch或tag发布时间:October 28, 2018 // 分类: // No Comments 取完整: git clone https://github.com/a ...

  4. git clone 某个链接时候报错Initialized empty Git repository in 不能克隆

    查看下是不是git是不是1.7.1版本. git --version 使用 yum -y update 更新一下. 再使用git clone 虽然还是会提示这个报错,但是可以克隆了.亲测有效. git ...

  5. git clone简介

    翻译整理自: http://web.mit.edu/~mkgray/project/silk/root/afs/sipb/project/git/git-doc/git-clone.html  在使用 ...

  6. 使用git建立远程仓库,让别人git clone下来

    首先, 如果你的ssh没有安装的话,要安装ssh服务端.ubuntu是很简单 sudo apt-get install openssh-server 1,建立你的git 目录. ourunix@ubu ...

  7. git分享(一)git clone

    git clone 命令参数: usage: git clone [options] [--] <repo> [<dir>] -v, --verbose be more ver ...

  8. git clone命令使用

    git clone命令使用 分类: 项目构建2013-06-26 15:43 38660人阅读 评论(2) 收藏 举报 GitClone git clone 命令参数: usage: git clon ...

  9. git -- git clone

    git clone 命令参数: usage: git clone [options] [--] <repo> [<dir>] -v, --verbose be more ver ...

随机推荐

  1. websocket redis实现集群即时消息聊天

    websocket与redismq实现集群消息聊天 1.application.properties server.port=8081 #thymeleaf配置 #是否启用模板缓存. spring.t ...

  2. ICMP与PING解析

    1.ICMP格式 ICMP是(Internet Control Message Protocol)Internet控制报文协议.它是TCP/IP协议族的一个子协议,用于在IP主机.路由器之间传递控制消 ...

  3. html5 canvas js(时钟)

    <!doctype html> <html> <head> <title>canvas</title> </head> < ...

  4. 实验一 Linux初步认识

    遇到的困难和心得体会: 1.在操作过程中,有道作业是建立一个opt/forloutest的文件,而我建立了一个 OPT文件,cd OPT,却显示not a directory,通过阅读<linu ...

  5. 20165101刘天野 2018-2019-2《网络对抗技术》Exp2 后门原理与实践

    目录 20165101刘天野 2018-2019-2<网络对抗技术>Exp2 后门原理与实践 1. 实验内容 1.1 使用netcat获取主机操作Shell,cron启动 1.2 使用so ...

  6. COS-5资源分配与调度

    操作系统是用户和计算机的接口,同时也是计算机硬件和其他软件的接口.操作系统的功能包括管理计算机系统的硬件.软件及数据资源,控制程序运行,改善人机界面,为其它应用软件提供支持,让计算机系统所有资源最大限 ...

  7. Spring框架下Junit测试

    Spring框架下Junit测试 一.设置 1.1 目录 设置源码目录和测试目录,这样在设置产生测试方法时,会统一放到一个目录,如果没有设置测试目录,则不会产生测试代码. 1.2 增加配置文件 Res ...

  8. Execute Disable Bit

    “Execute Disable Bit”是Intel在新一代处理器中引入的一项功能,开启该功能后,可以防止病毒.蠕虫.木马等程序利用溢出.无限扩大等手法去破坏系统内存并取得系统的控制权.其工作原理是 ...

  9. js里面如何才能让成员方法去调用类中其他成员

    function fun(){ var _this = this; //如果函数是用var定义的私有函数,如下 var func1 = function(){ } //那么类中其他函数都可以直接通过f ...

  10. windows拒绝远程登陆