~/Desktop/work/movies/movie(apps) $ git status  //先查看是否有需要提交的东西
# On branch apps
nothing to commit (working directory clean)
~/Desktop/work/movies/movie(apps) $ git checkout master //切换到主干
Switched to branch 'master'
~/Desktop/work/movies/movie(master) $ git status  //查看主干是否有需要提交的东西
# On branch master
nothing to commit (working directory clean)
~/Desktop/work/movies/movie(master) $ git pull  //再次确认是否需要更新代码查看主干是否有需要提交的东西
Already up-to-date.

~/Desktop/work/movies/movie(master) $ git checkout apps //切换到分支

Switched to branch 'apps'

~/Desktop/work/movies/movie(apps) $ git rebase master//拷贝主干最新内容
Current branch apps is up to date.
~/Desktop/work/movies/movie(apps) $ git checkout master //切换到主干
Switched to branch 'master'

~/Desktop/work/movies/movie(master) $ git merge apps //合并分支
Updating e6ba441..9bc179d
Fast-forward
 .../Classes/UI/Film/FilmListController.m           |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
~/Desktop/work/movies/movie(master) $ git branch
  apps
* master
~/Desktop/work/movies/movie(master) $ git apps
git: 'apps' is not a git command. See 'git --help'.

Did you mean this?
apply
~/Desktop/work/movies/movie(master) $ git checkout apps
Switched to branch 'apps'
~/Desktop/work/movies/movie(apps) $

 
 
 
 
 

Git 分支 主干的更多相关文章

  1. git分支主干

    ~/Desktop/work/movies/movie(apps) $ git status  //先查看是否有需要提交的东西# On branch appsnothing to commit (wo ...

  2. git分支与主干合并操作

    git分支与主干合并操作1.主干合并分支在主干上合并分支 branch (master)git merge branch --squash 提交合并后的代码 (master)git commit -m ...

  3. Git分支的前世今生

    摘自Jack__CJ  CSDN博客,写得很好,保存一下. 导读 几乎所有的版本控制系统都以某种形式支持分支. 使用分支意味着你可以把你的工作从开发主线上分离开来,以免影响开发主线. 在很多版本控制系 ...

  4. GIT分支管理模型

    GIT分支管理模型 link: git-branching-model 主分支(Main branches) 项目两个常驻分支: master 主干分支(锁定),仅用于发布新版本,平时不能在上面干活, ...

  5. Git详解之三 Git分支

    相关文档 — 更多 Git 基础培训.ppt GIT 使用经验.ppt GIT 介绍.pptx GIT 分支管理是一门艺术.docx Eclipse上GIT插件EGIT使用手册.docx git/gi ...

  6. Git 分支-利用分支进行开发的工作流程

    3.4 Git 分支 - 利用分支进行开发的工作流程 利用分支进行开发的工作流程 现在我们已经学会了新建分支和合并分支,可以(或应该)用它来做点什么呢?在本节,我们会介绍一些利用分支进行开发的工作流程 ...

  7. git学习笔记之二 -- git分支

    前面对git基础作了简单的总结,这次对git的杀手锏--分支做一总结. Git分支简介 几乎每个版本控制系统都以某种形式支持分支,可以使你的工作从开发主线上分离开来,以免影响开发主线.很多版本控制系统 ...

  8. Git分支使用心得

    在去年的大约这个时候,我的领导让我研究一下git的使用方法,方便我们自己的代码管理,因为我们原先使用的是SVN,使用起来没那么方便,所以让我研究研究git的使用.我就简单的研究了两天,用我的IDE(v ...

  9. Git详解之三:Git分支

    Git 分支 几乎每一种版本控制系统都以某种形式支持分支.使用分支意味着你可以从开发主线上分离开来,然后在不影响主线的同时继续工作.在很多版本控制系统中,这是个昂贵的过程,常常需要创建一个源代码目录的 ...

随机推荐

  1. &符号 (弃用引用传参了,不要用!!)

    写法一 $age = function grow($age) { $age += ; return $age; } echo grow($age) echo $age 写法二 $age = funct ...

  2. webuploader.js

    PHP  多图上传,图片批量上传插件,webuploader.js,百度文件上传插件(案例教程) WebUploader作用: 使用WebUploader还可以批量上传文件.支持缩略图等等众多参数选项 ...

  3. yii添加模型基础类

  4. Kotlin系列之序列(Sequences)源码完全解析

    Kotlin系列之序列(Sequences)源码完全解析 2018年06月05日 22:04:50 mikyou 阅读数:179 标签: Kotlin序列(sequence)源码解析Androidja ...

  5. canvas元素绘制太极图

    <!DOCTYPE html><html><head> <title>canvas example</title> <meta cha ...

  6. File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:

    1.centos7 系统,自带python2.7 ,我安装了python3.5 并设置为系统默认python ,yum 语法不支持 2.解决办法: ls /usr/bin | grep python选 ...

  7. linux安装mysql5.1

    一.卸载mysql 1.检测系统是否已经安装过mysql或其依赖,若已装过要先将其删除 # yum list installed | grep mysql mysql-libs.i686        ...

  8. xlrd使用

    import xlrd //导入模块filename='路径/文件名' //文件路径.名称python读取excel中单元格的内容返回的有5种类型,即ctype:0. empty(空的),1 stri ...

  9. 关于U3D图片的压缩格式

    http://blog.sina.com.cn/s/blog_930ffa0b0102vass.html

  10. computed

    Vue.js在模板表达式中限制了,绑定表达式最多只能有一条表达式,但某些数据需要一条以上的表达式运算实现,此时就可以将此数据放在计算属性(computed)当中.   Vuejs中关于computed ...