// 賬戶設定 git config --global user.name "ZeyFra" git config --global user.email "zeyfra@163.com" // 初次建立倉庫和提交 git init touch README.md git add README.md git commit -m "message" git remote add origin https://gitee.com/zeyfra/xxx.git git push -u origin master // 已有倉庫提交 git remote add origin https://gitee.com/zeyfra/xxx.git git push -u origin master // ! [rejected] master -> master (fetch first) git pull git push origin master // ! [rejected] master -> master (fetch first) git pull origin master --allow-unrelated-histories //把遠端倉庫和本地同步,消除差異 git add . git commit -m "message" git push origin master