1. 环境:git客户端,gitlab网页端,putty客户端
  2. 安装完git客户端之后生成公钥:ssh-keygen -t rsa -C "邮箱名@qq.com"
  3. 更新下来:git pull
  4. 查看修改:git status
  5. 新增:git add .
  6. 提交:git commit -m '提交注释'
  7. 上传:git push
  8. :q:退出命令
  9. 冲突解决方案,即gitlab覆盖我的(我并不作更新,否则冲突):git checkout 'main.html'
  10. 下载:git clone git@gitlab.xxx.com:xxx/base.git

注意:
1)没有pull的情况下报错

To gitlab.xxx.com:jbid/bid.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@gitlab.xxx.com:jbid/bid.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.

2)通过post传递对象时候(不过现在都用postman软件):

git:(post方法本地测试)
curl -H "Content-Type:application/json;charset=utf-8" -X POST http://localhost:81/xxxinfo/reguser -d '{"sessionkey_3rd": "c24f4a3b9f414ae54e46536649f61688","username": "mingzi","password": "123456","busilicence": "00","mobile": "具体手机号码","captcha": ""}'

git:(post方法正式环境测试):
curl -H "Content-Type:application/json;charset=utf-8" -X POST https://bidmini.xxx.cn/xxxinf... -d '{"sessionkey_3rd": "c24f4a3b9f414ae54e46536649f61688","username": "名字","password": "123456","busilicence": "03","mobile": "具体手机号码","captcha": ""}'

3)git 实现post请求时候对windows系统的中文执行不了,下面文章链接是参考:

https://blog.csdn.net/qq_2112...

学问思辨行
24 声望0 粉丝

记录过程,成长以后会慢慢感受到,价值必将无穷大!


« 上一篇
Linux命令
下一篇 »
Ajax