nhgxxyy0 2019-07-05
git config --global user.name "xxx"
git config --global user.email "xxx"
git init
git add .
git commit -m "xxxx"
提交信息! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://gitee.com/tahara/git-...'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
出现这个问题是因为gitee中的文件不在本地代码目录中,可以通过如下命令进行代码合并,之后在提交 git pull --rebase origin master
git remote add origin https://gitee.com/tahara/git-test.git
git push -u origin master