it commit提示Your branch is up-to-date with 'origin/master'.
今天提交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'.的更多相关文章
- Git代码提交报错 (Your branch is up to date with 'origin/master)
一.前言 今天码云上提交自己本地的一个SpringBoot+Vue的小项目,由于前端代码提交第一次时候提交码云上文件夹下为空,于是自己将本地代码复制到码云拉取下来代码文件夹下,然而git add . ...
- 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 ...
- 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- ...
- 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 ...
- git pull 然后 ahead of origin/master * commit 消失
本来显示 your branch is ahead origin/master * commit后来也许在master merge 这个分支后, 然后git pull, 就显示Your branch ...
- 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 ...
- 新建本地仓库,同步远程仓场景,出现git branch --set-upstream-to=origin/master master 解决方法
1.本地创建一个本地仓库 2.关联远程端:git remote add origin git@github.com:用户名/远程库名.git3.同步远程仓库到本地git pull这个时候会报错If y ...
- 【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' ...
- git: Your branch and 'origin/master' have diverged
git: Your branch and 'origin/master' have diverged - how to throw away local commits? - Stack Overfl ...
随机推荐
- rust变量与可变性
fn main() { //let x = 5; let mut x = 5; //通过const定义常量名称要大写,并且值不可更改 const Y:i32=6; println!("Y i ...
- 堆(heap)和栈(stack)有什么区别??
简单的可以理解为: heap:是由malloc之类函数分配的空间所在地.地址是由低向高增长的. stack:是自动分配变量,以及函数调用的时候所使用的一些空间.地址是由高向低减少的. 预备知识—程序的 ...
- Linux在线安装Redis
一.进入Redis官网寻找需要下载的版本:https://redis.io/ 将下载地址链接复制下来:http://download.redis.io/releases/redis-5.0.7.tar ...
- Error:(23, 0) Could not find method implementation() for arguments [directory 'libs'] on object of t
Error:(28, 0) Could not find method implementation() for arguments [com.android.support:appcompat-v7 ...
- golang testing 无法获取覆盖率问题
https://segmentfault.com/q/1010000021142202
- vue---发送数据请求的一些列的问题
使用vue做数据请求,首先考虑的是封装请求方法request.js import axios from 'axios' import Qs from 'qs' // 创建一个axios实例 const ...
- mac安装MySQLdb:IndexError: string index out of range
使用mac安装MySQLdb的时候出现string index out of range 大概的错误是这样的: 然后尝试手动安装,我下载了包后,依然出现这个错误. 于是百度了下: https://ww ...
- [LeetCode] 351. Android Unlock Patterns 安卓解锁模式
Given an Android 3x3 key lock screen and two integers m and n, where 1 ≤ m ≤ n ≤ 9, count the total ...
- Java环境配置-jdk和jre的安装
java 是直接在 jdk 下就可以运行 jdk会自带jre 所以只需要下载jdk配置一下环境就可以了 一般编辑java是需要 myeclipse 也可以用 记事本TXT文档 或者用 notepad+ ...
- 阿里云使用Docker部署工单系统(redmine)
环境:阿里云服务器 Redmine安装部署 Redmine是用Ruby开发的基于web的项目管理软件,是用ROR框架开发的一套跨平台项目管理系统,据说是源于Basecamp的ror版而来,支持多种数据 ...