Git命令
- 环境:git客户端,gitlab网页端,putty客户端
- 安装完git客户端之后生成公钥:ssh-keygen -t rsa -C "邮箱名@qq.com"
- 更新下来:git pull
- 查看修改:git status
- 新增:git add .
- 提交:git commit -m '提交注释'
- 上传:git push
- :q:退出命令
- 冲突解决方案,即gitlab覆盖我的(我并不作更新,否则冲突):git checkout 'main.html'
- 下载:git clone [email protected]:xxx/base.git
注意:
1)没有pull的情况下报错
! [rejected] master -> master (fetch first)
error: failed to push some refs to '[email protected]: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...相关推荐
formula 2020-11-12
huhongfei 2020-11-05
乾坤一碼農 2020-10-27
liumengyanysu 2020-10-22
E哥的aws认证攻略 2020-10-15
tianyafengxin 2020-10-08
guying 2020-10-05
好脑筋不如烂笔头 2020-09-17
nebulali 2020-09-11
佛系程序员J 2020-09-15
fenggit 2020-09-15
JustHaveTry 2020-09-11
兄dei努力赚钱吧 2020-09-06
IngeniousIT 2020-08-25
liumengyanysu 2020-08-17
guying 2020-08-16