我创建了一个名为amarjobs的存储库。
现在没有文件。
我想将我的工作文件上传到此存储库中。
我已经做了一些步骤:
git init
git remote add origin url
git pull
git push origin master
但这引发了错误。我是git的初学者。
我已经搜索过,但是对我的问题却没有满意的答案。
谁能解决我的问题?
错误:
谢谢。
您无法推送,因为远程分支中没有您没有的更改。
您只需git pull
在推送之前执行即可解决此问题。
遵循这些步骤,您将能够将代码推送到github:
# Create a git repository in the folder
git init
# add the remote url
git remote add origin [email protected]:chonchol/amajobs.git
# add your code to the repository
git add .
# commit your code
git commit -m "Message..."
# now once you have your code committed updated your branch with the remote code
git pull
# now once you have the commit message of the merge - commit and push
git push origin master
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句