1,在github中新建空的工程,第一次提交代码的时候 使用命令 $ git push -u origin master -f 后面就直接push就行了 转载于:https://www.cnblogs.com/lw-88238/p/9705644.html