git init
git remote add origin 项目地址git add .git commit -m "注释"git push origin master出现错误
$ git push origin masterTo https://gitee.com/heguxin/XXX ! [rejected] master -> master (fetch first)error: failed to push some refs to 'https://gitee.com/heguxin/XXXhint: Updates were rejected because the remote contains work that you dohint: not have locally. This is usually caused by another repository pushinghint: to the same ref. You may want to first integrate the remote changeshint: (e.g., 'git pull ...') before pushing again.hint: See the 'Note about fast-forwards' in 'git push --help' for details. 解决方法:git pull --rebase origin mastergit push origin master