我稍微修改了上述步骤,但是,我仍然收到错误 以下是新步骤: 1.将我的所有r代码和.png文件复制到我系统上的“Data_Analysis_Project_2”文件夹中
在终端:
cd ~/ Data_Analysis_Project_2
git init
git remote add origin
https://github.com/pruthvivenkata/Data_Analysis_Project_2.git
git add
git commit -m "committed"
git push origin master
在第7步之后,我收到以下错误:
error: failed to push some refs to 'https://github.com/pruthvivenkata/Data_Analysis_Project_2.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
请帮我解决此问题
答案 0 :(得分:0)
该错误表示对您的Github存储库进行了一些更改,这些更改当前未反映在您的本地存储库中。为避免冲突,您必须先git pull
远程更改到本地存储库,然后再尝试将新更改推送到远程存储库。