[英]git push origin develop does nothing
I'm new to using git. 我是新手使用git。 I tried doing
git push origin develop
and the terminal says everything is up to date. 我尝试做
git push origin develop
,终端说一切都是最新的。 I tried git diff --stat origin/develop
and the terminal displays: 我尝试了
git diff --stat origin/develop
,终端显示:
tpl/view/css/layout.css | 7 ++++---
tpl/view/ctrl.time-sheet-item.tpl | 10 +++++-----
tpl/view/ctrl.time-sheet.tpl | 7 +++----
3 files changed, 12 insertions(+), 12 deletions(-)
So to me, it looks like there should still be files to push. 所以对我来说,看起来仍然应该推送文件。 I went to my friend's computer and did a
git pull origin develop
, and it didn't receive the new changes to the three files I mentioned above. 我去了我朋友的计算机并
git pull origin develop
了一个git pull origin develop
,它没有收到我上面提到的三个文件的新变化。 How do I push my changes to the develop branch and receive them on another computer? 如何将更改推送到开发分支并在另一台计算机上接收它们?
Based off your comment the issue is (probably) that you branched repeatedly. 基于您的评论,问题是(可能)您反复分支。 (so like bar/develop, foo/bar/develop/ blah/foo/bar/develop, etc).
(所以像bar / develop,foo / bar / develop / blah / foo / bar / develop等)。
The reason your rebase is shooting you down is that you can't rebase to a branch that doesn't contain the initial commit you branched from ( fatal: Needed a single revision) 你的rebase击败你的原因是你不能改变到不包含你分支的初始提交的分支(致命:需要单个修订)
Do the following: 请执行下列操作:
git status
This will print your current branch. 这将打印您当前的分支。 (Lets assume its blah/foo/bar/develop)
(让我们假设它的blah / foo / bar / develop)
From here you have to options. 从这里你必须选择。
Option 1) Simpler, might not work if one of the intermediate steps has changed and you want things from it: 选项1)更简单,如果其中一个中间步骤发生了变化并且您想从中获取内容,则可能无效:
git checkout develop
git fetch
git rebase origin/develop
git merge origin/blah/foo/bar/develop
Option 2) Will work but could be very timeconsuming 选项2)可以工作,但可能非常耗时
git fetch
git rebase origin/foo/bar/develop
git push origin foo/bar/develop
git checkout foo/bar/develop
git rebase origin/bar/develop
git push origin bar/develop
git checkout bar/develop
git rebase origin/develop
I would probably try option 1 and only fall back to option 2 if option 1 doesn't work In either case, solve the merge conflicts if any and you're done: 如果选项1不起作用,我可能会尝试选项1并且只返回选项2在任何一种情况下,解决合并冲突(如果有的话)并且您已完成:
git commit -a
git push origin develop
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.