git push失败的解决办法(2)
错误一:Cannot rebase: You have unstaged changes
解决办法:
Cannot rebase: You have unstaged changes.
那说明有修改过的文件
git stash
git pull --rebase (每次push之前最好这样做一次)
git push ....
之后用git stash pop stash
- 命令:git stash
- 1.使用git
stash保存当前的工作现场,那么就可以切换到其他分支进行工作,或者在当前分支上完成其他紧急的工作,比如修订一个bug测试提交。 - 2.如果一个使用了一个git stash,切换到一个分支,且在该分支上的工作未完成也需要保存它的工作现场。再使用git
stash。那么stash 队列中就有了两个工作现场。 - 3.可以使用git stash list。查看stash队列。
- 4.如果在一个分支上想要恢复某一个工作现场怎么办:先用git stash
list查看stash队列。确定要恢复哪个工作现场到当前分支。然后用git stash pop stash@{num}。num
就是你要恢复的工作现场的编号。 - 5.如果想要清空stash队列则使用git stash clear。
- 6.同时注意使用git stash
pop命令是恢复stash队列中的stash@{0}即最上层的那个工作现场。而且使用pop命令恢复的工作现场,其对应的stash
在队列中删除。使用git stash apply stash@{num}方法除了不在stash队列删除外其他和git stash
pop 完全一样。
错误二:hint: Updates were rejected because the tip of your current branch is behind
原因:可能是由于很久没更新 当前的分支和git上的不同
命令:git rebase
把要更新的能容加到当前分支上
git push失败的解决办法(2)的更多相关文章
- git push remote error解决办法
通常在用git clone了remote端(服务器)的git仓库后,再进行了自己一系列修改后,会将自己测试后稳定的状态push到remote端,以更新源仓库,使 其他人在pull的时候得到自己的修改. ...
- git push出错的解决办法
今天push代码到线上的时候怎么都不行,尝试了很多办法报了好几种错比如: 反正就是各种错,然后其实不管什么错,你全部Git init 一下然后重新配置 git config --global user ...
- Git学习之常见错误 git push 失败
Git学习之常见错误 git push 失败 问题描述: git push Counting objects: , done. Delta compression using up to thread ...
- LoadLibrary加载动态库失败的解决办法
from:http://blog.sina.com.cn/s/blog_62ad1b8101017qub.html 若DLL不在调用方的同一目录下,可以用LoadLibrary(L"DLL绝 ...
- Data Base sqlServer sa用户登陆失败的解决办法
sqlserver sa用户登陆失败的解决办法 如下图以此模仿: 1.右键-属性 2.找到安全: 3.勾选如图: 4.sa用户密码重置: 5.服务重启:
- 微信公众平台Token验证失败的解决办法
微信公众平台Token验证失败的解决办法 1.可查看url和token是否正确 2.查看服务器端口是否为80端口 3.你可以通过记录log日志来判断是否接受到微信提交过来的信息 1.$fp=fopen ...
- Sql Server 2008 卸载重新安装失败的解决办法!(多次偿试,方法均有效!)
Sql Server 2008 卸载重新安装失败的解决办法!(多次偿试,方法均有效!) 1.控制面板中卸载所有带sql server的程序. 2.在C盘C:\Program Files中sqlserv ...
- npm install 错误 安装 chromedriver 失败的解决办法
npm 安装 chromedriver 失败的解决办法npm 安装 chromedriver 时,偶尔会出错,错误提示类似于:npm ERR! chromedriver@2.35.0 install: ...
- WCF传输过大的数据导致失败的解决办法
WCF传输过大的数据导致失败的解决办法 WCF服务默认是不配置数据传输的限制大小的,那么默认的大小好像是65535B,这才65KB左右,如果希望传输更大一些的数据呢,就需要手动指定一下缓冲区的大小 ...
随机推荐
- 课堂所讲整理:HTML--8Window.document对象
1.Window.document对象 一.找到元素: docunment.getElementById("id"):根据id找,最多找一个: var a =docunmen ...
- Codeforces Round #339 Div.2 B - Gena's Code
It's the year 4527 and the tanks game that we all know and love still exists. There also exists Grea ...
- Castle
Castle AOP 系列(一):对类方法调用的拦截(有源码) 标签: aopAOPCastle对类方法调用的拦截 2012-11-09 16:51 4207人阅读 评论(1) 收藏 举报 分类: ...
- Unable to determine the principal end of an association between the types '***. The principal end of this association must be explicitly configured using either the relationship fluent API or data annotations.
MVC中数据库表如果是一对一的主键关系时要加[Required]不然会出错Unable to determine the principal end of an association between ...
- wikioi 1688 求逆序对
/*=========================================================== wikioi 1688 求逆序对 时间限制: 1 s 空间限制: 12800 ...
- 2的N次方 【转】
题目的链接为:http://acm.njupt.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1009 题目为: 2的N次 ...
- charles proxy
charles proxy 一个比较好用的代理工具,可以进行数据的移动,以及pc 数据的抓包.
- C#去掉字符串中的特殊字符
方案一: string except_chars = ": ‘ ! @ # % … & * ( ^ & ¥ , . , .)$"; string src = ...
- html之texteara
定义多行的文本输入控件,所有浏览器都支持,可容纳无限的文本,等宽的字体. 用css的height和width来设置其框框的大小是个很好的办法,其中的文本换行符为%OD/%OA(回车换行) html5中 ...
- 计时器Chronometer和时钟(AnalogClock和DigitalClock)
计时器Chronometer和时钟(AnalogClock和DigitalClock) (1)Android提供了两个时钟组件:AnalogClock和DigitalClock,DigitalCloc ...