Git命令

  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/xxxinfo/reguser -d ‘{“sessionkey_3rd”: “c24f4a3b9f414ae54e46536649f61688”,“username”: “名字”,“password”: “123456”,“busilicence”: “03”,“mobile”: “具体手机号码”,“captcha”: “”}’

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

https://blog.csdn.net/qq_21126979/article/details/78690960?locationNum=10&fps=1

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

xuesibianxing

学有所沉,不忘初心,回馈社会

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值