不知何故,我的本地分支比远程分支晚了 8 个月。
当我做git pull origin [my branch name]
它说Already up to date
.
I tried git fetch origin [my branch name]
then git reset --hard FETCH_HEAD
(在这里找到)但我的本地副本仍然指向超级旧的提交。
我也尝试过使用重置为特定的git checkout 1d5d525
(在这里找到)但它说:error: pathspec '1d5d525' did not match any file(s) known to git.
但该提交在远程分支中是 100%,因为我可以在 BitBucket 中看到它。
我唯一能想到的与我所做的不同的是,昨天我在另一台机器上工作(我的 OSX 笔记本电脑,而不是我的 Win10 台式机),但这并不能解释为什么落后了 8 个月。
如果有哪位大师能给我一些指导,那就太好了。
注意:我可以从我的笔记本电脑提交更多更改,它们会显示在 BitBucket 中我的分支上,但仍然没有运气。
注意:如果信息很重要,我是唯一在该分支工作的人。
Thanks!
EDIT:
这是输出git branch -vv
and git remote - v
按照要求。
$ git branch -vv
ImageEdit 39b733c Image editing tweaks
Widgets cce09e8 Merge Globals + Widgets to use the same functionality / DB table
* john 11798f3 [origin/john] Finished PDF Header. Waiting for feedback...
master cce09e8 Merge Globals + Widgets to use the same functionality / DB table
$ git remote - v
origin [email protected]:johnt/website.git (fetch)
origin [email protected]:johnt/website.git (push)
注意:我会指出,根据上述提交消息,主分支似乎也落后于远程分支。
EDIT 2:
这是输出git branch -a -vv
$ git branch -a -vv
ImageEdit 39b733c Image editing tweaks
Widgets cce09e8 Merge Globals + Widgets to use the same functionality / DB table
* john 11798f3 [origin/john] Finished PDF Header. Waaiting for feedback...
master cce09e8 Merge Globals + Widgets to use the same functionality / DB table
remotes/origin/ImageEdit 39b733c Image editing tweaks
remotes/origin/Widgets cce09e8 Merge Globals + Widgets to use the same functionality / DB table
remotes/origin/glenn 0548f0d Changed Create a Lifeshare Page to Create a Lifeshare
remotes/origin/john 11798f3 Finished PDF Header. Waiting for feedback...
remotes/origin/master cce09e8 Merge Globals + Widgets to use the same functionality / DB table