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 ...
随机推荐
- 【AE软件】视频添加字幕
1.导入视频 2.将视频拖入大屏幕 3.在下面点击右键——新建——文本 4.文字属性设置
- 【解决方案】Chrome崩溃问题解决
问题描述 出现异常之前做的操作就是,因为换工位的需要,所以关闭电脑,修改网络配置. 问题分析 Firefox和其他应用网络正常 Chrome设置.帮助等选项均打不开 分析,很可能是电脑重启后,Wind ...
- Web前端开发规范之脚本文件和动态文本文件命名规则
脚本文件:一般使用脚本功能的英文小写缩写命名 实际模块:例如广告条的javascript文件名为ad.js,弹出窗口的javascript文件名为pop.js 公用模块:js文件命名:英文命名,后缀j ...
- SQL server 表结构转Oracle SQL脚本
SQL server 表结构转Oracle SQL脚本 /****** Object: StoredProcedure [dbo].[getOracle] Script Date: 2019/7/25 ...
- merge同时包含增、改、删
我们都知道oracle merge可以用来增和改,很少用它来删除.但是有时候我们仍然需要该特性,以提高性能,典型的场景就是将业务库逻辑删除的记录同步到查询库的时候,做真正的物理删除,这个时候merge ...
- k8s 传参给docker env command、args和dockerfile中的entrypoint、cmd之间的关系
[k8s]args指令案例-彻底理解docker entrypoint 需求: 搞个镜像,可以运行java -jar xxx.jar包,xxx.jar包名称要用参数传 思路1: 打对应运行ja ...
- 如何查看window 7/window 8 等系统 的激活状态?
http://www.officezhushou.com/office-key/ Office激活密钥 Win+R 输入: slmgr.vbs -dlv 显示:最为详尽的激活信息,包括:激活ID. ...
- 日志分类以及TFIDF
TF的概念是Term Frequent,是一个单词出现的频率,是一个局部概念,就是这个单词在指定文件中出现的频率,公式如下: 但是呢,这个TF其实很没有说服力,比如the,a之类的频率很高,但是其实不 ...
- z-score,beta,SE换算
换算公式:z-score=beta/SE 如果是从GWAS summary数据换算的话就是:z-score=Effect/StdErr 来源:https://www.biostars.org/p/14 ...
- [LeetCode] 651. 4 Keys Keyboard 四键的键盘
Imagine you have a special keyboard with the following keys: Key 1: (A): Print one 'A' on screen. Ke ...