Git提交Everything up-to-date Branch 'master' set up to track remote branch 'master' from 'origin'如何解决
原创约 589 字大约 2 分钟...
11-Git提交Everything up-to-date Branch 'master' set up to track remote branch 'master' from 'origin'如何解决?.md
注意
本博文仅供学术研究和交流参考,严禁将其用于商业用途。如因违规使用产生的任何法律问题,使用者需自行负责。
- 如图所示,一切都是正常操作,结果报错如下:
Everything up-to-date
Branch 'master' set up to track remote branch 'master' from 'origin'.

- 而且根据git log命令查看得出,自己今天提交多次


- 但github上却显示我只提交咯一次!!!!!!!


- 我的解决方法如下:
先执行命令 git log,这个老重要咯。。几乎决定生死。。。。
按键盘q键,Enter退出
执行命令git rebase --abort,则会看到右侧的()里的内容已经变成咯主分支,并且没有咯REBASE 1/1

- 但虽然回到咯主分支,但是你会惊奇的发现自己本地的文件好多都任空消失咯,惊不惊喜,意不意外。。。。哈哈哈哈哈。。。, 不要慌。。。我也办法。。。。哼哼哼。。。
- 根据刚刚的git log 命令找到 自己提交的最新的提交的版本号,比如我的最新的提交为
commit 186076570deefcf6d300cec81b5a97936d0f1e3e (HEAD)
Author: yanbo0039 <yanbo0039@yeah.net>
Date: Mon Jul 8 13:50:58 2019 +0800
NO.7-4-1
- 穿越到最新的分支版本,恢复本地文件,需要知道自己的版本号,例我的是 186076570deefcf6d300cec81b5a97936d0f1e3e 执行如下命令,
$ git reset --hard 186076570deefcf6d300cec81b5a97936d0f1e3e

- 接下来再正常操作,分别执行git add . 和 **git commit -m "提交信息"**命令,不出意外,你会遇到如下的bug

- 接下来,请不要客气,强制推送,执行如下命令
$ git push -f origin master

- 执行以上操作后,那么本地文件也会恢复到最后一 次提交,github上也被全部提交咯。

分割线
相关信息
以上就是我关于 Git提交Everything up-to-date Branch 'master' set up to track remote branch 'master' from 'origin'如何解决? 知识点的整理与总结的全部内容
Powered by Waline v2.15.4