社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
安装指令
yum install git
查看安装是否成功和git版本
git --version
完成后保存项目链接
git clone [url] //这里的url为上一步保存的项目链接
ssh-keygen -t rsa -C your_email@你的邮箱
然后一直回车 直到创建完成。
git add [文件名]
git commit . // "."表示当前目录
在这里建议大家在提交的时候注明提交日志!!!
git push
1. 在使用 git push 后提示错误为:
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as ‘master’.
Everything up-to-date
解决方案:
git push origin master
2 提示错误:fatal: remote origin already exists.
解决方法:
git remote rm origin
3 git未初始化
提示错误:
***Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
解决方法:
git config --global user.name "your_email"
config --global user.email "your_email@example.com"
感谢大家的参考,希望可以帮助到大家(__) !
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!