git - Git rebase again then push (again) is rejected
问题描述
I put in a pull request a while ago to an open source project. The change wasn't rejected as such, just left hanging. I returned to it today because I encountered errors related to that same block of code. I wanted to check my changes were still non-breaking before I add some comments (along the lines of "is anything ever going to happen with this?") Here's what I did: (I do my work on a develop
branch and I start on master
)
git fetch upstream
git merge upstream/master
git co develop
git rebase upstream/master
I was left with a difference in a submodule so I ran
git submodule update
Ran the tests, all green. Go to push…</p>
git push origin develop
To https://github.com/yb66/ffi.git
! [rejected] develop -> develop (non-fast-forward)
error: failed to push some refs to 'https://github.com/yb66/ffi.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
I must confess some ignorance, I've never bothered to learn about fast-forwarding. I know, I'm a bad person. I am about to read a couple of articles on it but as is ever the rule with git, knowing the theory will not magically make its interface correspond to my desires. I will still not know what's the best action to take in this specific instance. I will just understand what (hopefully) you will tell me to do instead of running it blindly.
I've already published my changes, I need to update them, what's the best course of action from here? If it was my own project I'd delete the branch, start a new pull request and reference the old one, but that's my laziness mixed in with impatience.
Feel free to scold me for these traits too, Larry Wall was half right.
解决方案
推荐阅读
- oracle - 根据输入值从一个过程调用不同的过程
- angular - 带有 ux_mode 的 Angular/Typescript Google 登录 API:重定向
- html - 单击不同的按钮会打开不同的选项卡,但在相同的模式内
- keras - InceptionV3+LSTM活动识别,准确率增长10个epoch后下降
- angular6 - angular6 无法从 component.ts 设置 ngForm 的值
- r - 如何在 R 中使用当前语言环境格式化时间
- html - 当窗口大小减小时,图像跨越到下一个 div
- php - 我想计算我的数据库中的特定字段取决于 ID_number
- amazon-web-services - 克服 Lambda 函数超时的建议
- c++ - 超过 5 年未修复的 Clang 错误。该怎么办?