把握今天,才能拥有明天!
今天学习了git·和github的使用,并在github上成功上传了几份代码,参考教程:
https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000
感谢廖雪峰老师!
太复杂的我就不赘述了,因为目前水平不够,我就简单记一下现在用的简单命令,省的用的时候自己找不到。
git仓库地址: cd /g/git_practice
检查状态:git status
添加所有文件:git add .
执行提交:git commit -m "记录消息,方便查看"
查看提交历史:git log
向github备份:git push -u origin master
push出现错误:
error: failed to push some refs to 'git@github.com:....." Updates were rejected because the remote contains work that you do not have locally.
This is usually caused by another repository pushing to
解决方法:
git pull origin master
git push -u origin master
我的github地址是:https://github.com/Alihuhu