今天提交git仓库的时候,遇到了如截图所示的问题,提示Your branch is up-to-date with 'origin/master'.

查了些资料后,发现其根本原因是版本分支的问题

这时候我们就需要新建一个分支
$ git branch newbranch
然后检查分支是否创建成功
$ git branch

会有如下提示(前面的*代表的是当前你所在的工作分支)

然后切换到你的新分支
$ git checkout newbranch

如果不放心,还可以 $ git branch确认下

然后将你的改动提交到新分支上
$ git add .
$ git commit -m "18.03.01"
然后git status检查是否成功
然后切换到主分支
$ git checkout master
然后将新分支提交的改动合并到主分支上
$ git merge newbranch
然后就可以push代码了
$ git push -u origin master
最后还可以删除这个分支
$ git branch -D newbranch

END

小礼物走一走,来简书关注我

作者:李佳明先生
链接:https://www.jianshu.com/p/e25c763b9816
来源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

it commit提示Your branch is up-to-date with 'origin/master'.的更多相关文章

  1. Git代码提交报错 (Your branch is up to date with 'origin/master)

    一.前言 今天码云上提交自己本地的一个SpringBoot+Vue的小项目,由于前端代码提交第一次时候提交码云上文件夹下为空,于是自己将本地代码复制到码云拉取下来代码文件夹下,然而git add . ...

  2. Git报错:Your branch is up to date with 'origin/master'.

    Git在提交的时候报错 Your branch is up to date with 'origin/master'. 报错 Your branch is up to date with 'origi ...

  3. git 拉取远程分支报错(fatal: '' is not a commit and a branch '' cannot be created from it)

    问题描述从远程git上拉取某一个分支,然后报错,拉取不了这个分支. 拉取分支的命令: git checkout -b xxx-static-19 origin/xxx-static-19 其中xxx- ...

  4. Git报错:Your branch is ahead of 'origin/master' by 1 commit

    .    commit之后,用git status,打印信息为: # On branch master # Your branch is ahead of 'origin/master' by 1 c ...

  5. git pull 然后 ahead of origin/master * commit 消失

    本来显示 your branch is ahead origin/master * commit后来也许在master merge 这个分支后, 然后git pull, 就显示Your branch ...

  6. git status message - Your branch is ahead of origin/master by X commits

    git reset --hard origin/master git status FAQ: When I issue the "git status" command, I se ...

  7. 新建本地仓库,同步远程仓场景,出现git branch --set-upstream-to=origin/master master 解决方法

    1.本地创建一个本地仓库 2.关联远程端:git remote add origin git@github.com:用户名/远程库名.git3.同步远程仓库到本地git pull这个时候会报错If y ...

  8. 【IDEA】 Can't Update No tracked branch configured for branch master or the branch doesn't exist. To make your branch track a remote branch call, for example, git branch --set-upstream-to origin/master

    IDEA点击GIT更新按钮时,报错如下: Can't UpdateNo tracked branch configured for branch master or the branch doesn' ...

  9. git: Your branch and 'origin/master' have diverged

    git: Your branch and 'origin/master' have diverged - how to throw away local commits? - Stack Overfl ...

随机推荐

  1. 【spring源码分析】IOC容器解析

    参考: https://www.iteye.com/topic/1121913(自动注入bean的扫描器) https://m.imooc.com/mip/article/34150(循环依赖的解决方 ...

  2. 【转】git branch 命令查看分支、删除远程分支、本地分支

    git branch 命令操作 1.查看本地分支 : git branch 前面带有*号的是当前分支 2 .删除本地分支: git branch -d [branchname] 提示删除了一个名为li ...

  3. C++ Java throw goto

    throw goto - 国内版 Binghttps://cn.bing.com/search?FORM=U227DF&PC=U227&q=throw+goto C++ throw 代 ...

  4. 对象与json字符串转换类设计

    public static class JsonNewtonsoft { /// <summary> /// 把对象转换为JSON字符串 /// </summary> /// ...

  5. Java12新特性 -- Shenandoah GC

    Shenandoah 垃圾回收器是 Red Hat 在 2014 年宣布进行的一项垃圾收集器研究项目 Pauseless GC 的实现,旨在针对 JVM 上的内存收回实现低停顿的需求.该设计将与应用程 ...

  6. PHP 基于 Jenkins ansible 动态选择版本进行自动化部署与回滚(第二版)

    PHP 基于 Jenkins ansible 动态选择版本进行自动化部署与回滚(第二版) 先看流程图: 大概介绍一下: 版本选择使用jenkins 中的 git parameter 插件实现 回滚方式 ...

  7. 基于EasyNVR摄像机网页无插件直播服务二次开发实现H5播放页面的简单集成方案

    我们通常在构架一套视频SaaS应用的过程中,将平台设计为3层:视频硬件层(视频源).视频能力平台(vPaaS).视频应用平台(vSaaS),视频硬件包括各种IPC.NVR.编码器等视频生成设备,vPa ...

  8. 移动端播放直播流(video.js 播放 m3u8 流)

    流媒体服务器: wowza 流媒体格式: m3u8 播放端:移动端网页(Android.IOS) 播放工具: video.js 代码如下: <!DOCTYPE html> <html ...

  9. 【视频开发】CximageMat 、CximagelplImage 以及 lplImageMat的转换、像素位深度

    1.传统的lplImage * -------> Mat格式 IplImage* img = cvLoadImage("greatwave.png", 1); Mat mtx ...

  10. [05]Go设计模式:建造者模式(Builder Pattern)

    目录 建造者模式 一.简介 二.代码 三:参考资料 建造者模式 一.简介 建造者模式(Builder Pattern)使用多个简单的对象一步一步构建成一个复杂的对象.这种类型的设计模式属于创建型模式, ...