项目初始化git:git init 连接请求git:git remote add origin https://gitee.com/LHJ0315/AAA.git 更改远程路径:git remote set-url origin https://gitee.com/LHJ0315/AAA.git 强制提交代码:git push -u origin master --force 提交代码:git push origin master 产生如下错误: error: src refspec master does not match any. error: failed to push some refs to "xxxxxxx" 然后用如下方法解决了: git add . git commit -m "write your message"