VS 2019 Git failed with a fatal error的解决办法

将分支推送到远程存储库时遇到错误: rejected Updates were rejected because the tip of your current branch is behind its remote counterpart. Integrate the remote changes  before pushing again.

这里我们选择“打开命令提示符”菜单,打开了命令提示符,输入提交到远程命令:

git push origin master

如遇到 hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. 则

git pull origin master --allow-unrelated-histories

 

posted @ 2020-05-15 14:12  拼博之路  阅读(5297)  评论(0编辑  收藏  举报