git rabase之后,每次都需要rebase
来源:互联网 发布:徽标设计软件 编辑:程序博客网 时间:2024/06/06 09:08
前段时间,代码有的混乱,就用了一次rebase
$ git pull --rebase
$ git commit -m 'xxxxx'
$ git push
然后下一次想要用
$ git pull
这时就出现了
$ git pullerror: cannot pull with rebase: You have unstaged changes.error: please commit or stash them.
用git status查看当前状态
$ git statusOn branch masterYour branch is up-to-date with 'origin/master'.Changes not staged for commit: (use "git add..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory) modified: webportal/com-iyunxiao-dora-webportal/src/main/resources/spring-config.xml modified: webportal/com-iyunxiao-dora-webportal/src/main/resources/spring-servlet.xmlno changes added to commit (use "git add" and/or "git commit -a")
确实有改动过的文件,stash之后,再用pull,是没问题的,
但是不应该可以直接pull的吗?
baidu&google都搜了,没有跟我相同的问题,都是不符合我遇到的情况
折腾了两周时间
前天晚上,还是去看git的官方文档吧
然后就发现了,解决方案
这里就不贴原文了
有兴趣的同学可以自行查看
https://git-scm.com/docs/git-pull#git-pull---rebasefalsetruepreserveinteractive
https://git-scm.com/docs/git-config#git-config-branchautoSetupRebase
https://git-scm.com/docs/git-config#git-config-branchltnamegtrebase
https://git-scm.com/docs/git-config#git-config-pullrebase
https://git-scm.com/docs/git-config#git-config---global
https://git-scm.com/docs/git-config#git-config---system
https://git-scm.com/docs/git-config#git-config---local
最后我采用的是
$ git config -e --golobal$ git config -e --local$ git config -e --system
分别修改配置文件里面的,把跟rebase相关的配置项都删除掉
现在就可以愉快地pull了
阅读全文
0 0
- git rabase之后,每次都需要rebase
- git push 每次都需要输入用户名和密码
- git 提交时,每次都需要输入用户名、密码
- git push 每次都需要输入用户名和密码
- 解决git pull/push每次都需要输入密码问题
- Github:每次git push推送的时候都需要输入git的用户名和密码
- git push 每次都需要输入用户名和密码 TortoiseGit 不用每次输入用户名和密码的方法
- git rebase之前需要commit才行
- Git避免每次远程交互都需要输入密码的设置
- 解决git push 时每次都需要输入用户名和密码
- Git——解决每次push都需要输用户名密码的问题
- git 设置不需要输入密码, 去除 fetch / pull 代码每次都需要输入密码的烦恼
- git使用push或者pull命令每次都需要输入用户名和密码?
- JBuilder2006每次启动都需要重新注册?
- 取消office每次打开都需要安装!
- office每次运行都需要配置解决方案
- Git解决每次都要输入密码
- git- rebase
- 如何学习自然语言处理:一本书和一门课
- 第四周项目 项目5
- Spring MVC之@RequestBody, @ResponseBody 详解
- 数据类型和运算符
- Unity3D内存管理——对象池(Object Pool)
- git rabase之后,每次都需要rebase
- 关于ios11开发,window层不显示view,项目图片不显示。
- Event/window.Event属性和方法
- 关于if语句的一个有点意思的简洁写法
- 用python-docx修改已存在的Word文档的表格的字体格式:
- mxnet 安装0.9.5版本 解决cub问题
- 图像平滑
- leetcode9---python
- 第七周 【项目2