Git 码云初次提交代码

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_31424825/article/details/82120340

作者:LoveEmperor-王子様

一、提交代码:

    git init
    git add .
    git config user.name 'xxx'
    git config user.email '[email protected]'
    git commit -m 'project init'
    git remote add origin https://git.oschina.net/xxx/xx.git
    git pull origin master
    git push -u origin master

二、其他仓代码提交问题:

fatal: refusing to merge unrelated histories

用下指令合并

git pull origin master --allow-unrelated-histories

猜你喜欢

转载自blog.csdn.net/qq_31424825/article/details/82120340