- 环境: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 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...
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。