git push 遇到的问题及解决方案

1.git push 常见错误及解决方法
A:使用 git push -u origin master出错
a.error:failed to push some refs to 'https://github.com/*****/xxx.git'git push 遇到的问题及解决方案_第1张图片

原因:
  github上创建远程仓库的时候选择添加README.md文件,
  github中的README.md文件不在本地代码目录中;
  解决方案:
  1.执行将代码合并
     git pull --rebase origin master
  2.执行  git push -u origin master
B:使用git push https://github.com/wangtao-luse/static.git(仓库地址) master 提交时
b.fatal:TaskCanceledException encountered.
 

解决方案:
  执行以下命令:
   git config --global credential.helper manager
C:使用git push  https://github.com/wangtao-luse/static.git仓库地址 master 提交时
 c.Everything up-to-dadte

   原因:
    1.没有git add .
    2.没有git commit -m '提交信息';
    https://www.cnblogs.com/kevingrace/p/6259905.html

你可能感兴趣的:(git)