阿里云使用
一、注册
用淘宝账号就可以登录
二、下载配置git
git config --global user.name
git config --global user.email
git config --global –list
三、创建密钥
git bash中输入:
ssh –key –t rsa –C “你的邮箱”
在C:\Users\Administrator.ssh中找到.pub文件,打开就是你的密钥
四、阿里云添加密钥
五、HTTPS密码
点击HTTPS密码,直接输入一个密码即可,目前本人只是填了密码,还没有用过
六、上传文件
在文件目录下打开git bash输入一下命令
git init
git remote add origin git@code.aliyun.com:account/Test.git项目的SSH
git add .
git commit –m “message”
git push –u origin master
成功上传
如果上传冲突或者失败,可以使用
git push -f origin master
强推覆盖,但是不建议使用,因为他会覆盖掉之前上传的代码,这里是我上传代码发生冲突没有其他办法解决才使用的,慎用!!!
Ps:拷贝远程git项目
git clone git@code.aliyun.com:account/Test.git项目的SSH