如题,本人新手,第一次使用git,想把自己本地的文件传到github上,方便展示和记录版本状态。
但在操作过程中,遇到过两处问题:
1.在首次上传时,没有注册用户信息,出现了这样的错误 :
通过
git config --global user.email 'youremail'
git config --global
user.name 'yourname'
就好了;
git config --global
就好了;
2.在第二次上传时,由于本地和远程的README文件不一致,出现了:
failed to push some refs to 'https://github.com/skyclouder/test.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: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.。。。。。。的错误信息;
解决方式:$ git pull --rebase origin master