问题1:
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
解决:
第一步:git pull --rebase origin master
若出现冲突会出现(master | REBASE)的情况,需要根据提示手动去对应的代码文件下修改重复的代码行。
第二步:git rebase --continue
# Please enter the commit message for your changes. Lines starting # with # will be ignored, and an empty message aborts the commit.
会弹出基于vim的文本编辑器,可进行一下操作:
i - 进入insert模式,补充commit信息
esc - 退出insert模式
:wq - 退出文本编辑器
退出后会发现master后的REBASE消失了。
第三步:git push origin master / git push -u origin master
随后就可以正常提交了。