由git-scm https://git-scm.com/download/win 下载对应的平台版本,默认安装。
初始环境配置
初始环境配置
1. 桌面点击右键,选择Git Bash
2. 执行ssh-keygen命令,生成ssh认证文件(默认回车,无密码)
3. 提交生成的idrsa.pub文件(注意备份idrsa、id_rsa.pub文件)
4. 创建工作目录 ums/oms,并获取远程版本库代码
git clone git@172.16.1.100:oms.git
git clone git@172.16.1.100:ums.git
代码更新提交
1. 由git server获取代码更新
选中文件夹,右键选择Git GUI,执行:远端→从..获取(fetch)
等同于命令行
git pull
2. 提交代码并发布至test server
2-1. 编辑代码
2-2. 右键选择Git Gui
2-3. 按顺序执行:缓存改动→提交→上传
等同于命令行
git add .
git commit –am “add the test coding”
git push)
校验结果
查看测试服务器web页面结果(提交更新后,代码将自动发布到usm/oms测试服务器)