使用 eclipse 提交 GitHub 代码的时候,使用了amend方式提交。后续需要到对应的目录下执行对应的提交才会真正的提交到GitHub。

执行以下 git status  命令 查看未提交GitHub 内容:

On branch master
Your branch and 'origin/master' have diverged,
and have 2 and 1 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

先执行 rebase 命令

git rebase origin/master

在执行 pull 命令

git pull --rebase

在提交 push  命令 提交到远程GitHub 上

git push origin master

 

 

  

 

posted on 2021-01-22 15:16  FUN+咖啡  阅读(163)  评论(0编辑  收藏  举报