Commit 4300cfbe authored by 王进波's avatar 王进波

update

parent 78e9061b
......@@ -84,7 +84,7 @@ git config --global core.safecrlf true #打开安全crlf
然后,我们要将Web前端创建的远程仓库的Url添加到本地的origin标识中
```shell
git remote add origin https://civpub.vicp.net:8443/TestUse/test.git #这里我们默认使用https
git remote add origin https://civgit.vicp.net:8443/TestUse/test.git #这里我们默认使用https
git remote #该命令检查本地配置的远程标识,可能存在多个远程url
git remote -v #查看当前远程url的详细信息
```
......@@ -103,7 +103,7 @@ git commit -m "initial commit" #提交暂存区中的修改,双引号内的内
![1533177035857](../../imgs/1533177035857.png)
```shell
git push origin master #将当前工作目录中的所有提交推送到远端仓库,origin指向了 https://civpub.vicp.net:8443/TestUse/test.git,master是新建仓库的默认分支,我们将代码提交到master分支
git push origin master #将当前工作目录中的所有提交推送到远端仓库,origin指向了 https://civgit.vicp.net:8443/TestUse/test.git,master是新建仓库的默认分支,我们将代码提交到master分支
#master 分支是默认受保护分支,执行push操作需要用户具有高于Developer的权限
```
......@@ -113,7 +113,7 @@ Powershell中完整的输入输出如下
PS F:\jekyllTest\mysite> git init
Initialized empty Git repository in F:/jekyllTest/mysite/.git/
PS F:\jekyllTest\mysite> git remote
PS F:\jekyllTest\mysite> git remote add origin https://civpub.vicp.net:8443/TestUse/test.git
PS F:\jekyllTest\mysite> git remote add origin https://civgit.vicp.net:8443/TestUse/test.git
PS F:\jekyllTest\mysite> git remote
origin
PS F:\jekyllTest\mysite> git add .
......@@ -140,10 +140,10 @@ PS F:\jekyllTest\mysite> start .
PS F:\jekyllTest\mysite> git init
Initialized empty Git repository in F:/jekyllTest/mysite/.git/
PS F:\jekyllTest\mysite> git remote -v
PS F:\jekyllTest\mysite> git remote add origin https://civpub.vicp.net:8443/TestUse/test.git
PS F:\jekyllTest\mysite> git remote add origin https://civgit.vicp.net:8443/TestUse/test.git
PS F:\jekyllTest\mysite> git remote -v
origin https://civpub.vicp.net:8443/TestUse/test.git (fetch)
origin https://civpub.vicp.net:8443/TestUse/test.git (push)
origin https://civgit.vicp.net:8443/TestUse/test.git (fetch)
origin https://civgit.vicp.net:8443/TestUse/test.git (push)
PS F:\jekyllTest\mysite> git add .
PS F:\jekyllTest\mysite> git status
On branch master
......@@ -193,9 +193,9 @@ Compressing objects: 100% (15/15), done.
Writing objects: 100% (16/16), 41.37 KiB | 3.76 MiB/s, done.
Total 16 (delta 0), reused 0 (delta 0)
remote: GitLab: You are not allowed to push code to protected branches on this project.
To https://civpub.vicp.net:8443/TestUse/test.git
To https://civgit.vicp.net:8443/TestUse/test.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://civpub.vicp.net:8443/TestUse/test.git'
error: failed to push some refs to 'https://civgit.vicp.net:8443/TestUse/test.git'
PS F:\jekyllTest\mysite>
#最后这里因为我用wangjinbo这个用户执行的push到master分支的操作,wangjinbo在test组的权限是developer,developer不允许向master推送提交
```
......
......@@ -23,7 +23,7 @@
```shell
cd /d E:\Codes\City #我们先用CMD命令行的CD命令导航到我们习惯存放代码的路径下
git clone https://civpub.vicp.net:8443/TestUse/test.git CityTest #clone远程仓库
git clone https://civgit.vicp.net:8443/TestUse/test.git CityTest #clone远程仓库
```
![1533178094362](../../imgs/1533178094362.png)
......
......@@ -8,7 +8,7 @@
## Git 账号
GitlabServer: http://civpub.vicp.net:8880
GitlabServer: http://civgit.vicp.net:8880
推荐的两处学习资源
......
......@@ -2,11 +2,11 @@
edit-by:王进波 2018.08
- [安装Git-Windows](https://civpub.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/doc/FromSVNToGit/InstallGitWindows.md)
- [安装TotoiseGit](https://civpub.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/doc/FromSVNToGit/InstallTotoiseGit.md)
- [Git 常用操作命令](https://civpub.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/doc/FromSVNToGit/CommenCmd.md)
- [Git 账号与学习资料](https://civpub.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/doc/FromSVNToGit/GitlabAccount.md)
- [创建新仓库](https://civpub.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/doc/FromSVNToGit/CreateNewRepository.md)
- [命令行演示常用操作](https://civpub.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/doc/FromSVNToGit/DemonstrateInCmd.md)
- [图形界面的Git - SourceTree](https://civpub.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/doc/FromSVNToGit/DemonstrateInSourceTree.md)
- [安装Git-Windows](https://civgit.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/doc/FromSVNToGit/InstallGitWindows.md)
- [安装TotoiseGit](https://civgit.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/doc/FromSVNToGit/InstallTotoiseGit.md)
- [Git 常用操作命令](https://civgit.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/doc/FromSVNToGit/CommenCmd.md)
- [Git 账号与学习资料](https://civgit.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/doc/FromSVNToGit/GitlabAccount.md)
- [创建新仓库](https://civgit.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/doc/FromSVNToGit/CreateNewRepository.md)
- [命令行演示常用操作](https://civgit.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/doc/FromSVNToGit/DemonstrateInCmd.md)
- [图形界面的Git - SourceTree](https://civgit.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/doc/FromSVNToGit/DemonstrateInSourceTree.md)
......@@ -188,7 +188,7 @@ Zabbix监控服务有一个可配置的Web前端,发布在http://192.168.12.1:
### 监控模板
监控模板可以导入导出,我导出的模板文件在 [这里](https://civpub.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/%E5%B7%A5%E5%85%B7/zbx_export_templates.xml)。 下载后在导入界面导入即可,导入成功后还需要增加一项监控项原型。
监控模板可以导入导出,我导出的模板文件在 [这里](https://civgit.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/%E5%B7%A5%E5%85%B7/zbx_export_templates.xml)。 下载后在导入界面导入即可,导入成功后还需要增加一项监控项原型。
Configuration - Template - Template OS Windows Wohi - Discovery roles - Network interface discovery - item prototypes,如图
......
......@@ -21,7 +21,7 @@ edit-by:王进波 2018.08.06
## 检查新增分组和代码
打开Gitlab网页:http://civpub.vicp.net:8880 进入CivDevelop分组
打开Gitlab网页:http://civgit.vicp.net:8880 进入CivDevelop分组
## 签出CityWebService和Web4
......@@ -33,7 +33,7 @@ edit-by:王进波 2018.08.06
检出CityWebService后端代码
```shell
git clone -b develop https://civpub.vicp.net:8443/CivDevelope/CityWebService.git #检出develop分支
git clone -b develop https://civgit.vicp.net:8443/CivDevelope/CityWebService.git #检出develop分支
cd CityWebService
git branch #查看本地当前分支,是develop
git branch -a #查看本地和远程的全部分支
......@@ -42,7 +42,7 @@ git branch -a #查看本地和远程的全部分支
检出Web4前端代码
```shell
git clone -b develop https://civpub.vicp.net:8443/CivDevelope/Web4.git
git clone -b develop https://civgit.vicp.net:8443/CivDevelope/Web4.git
cd Web4
git branch
git branch -a
......@@ -74,9 +74,9 @@ git branch #检查当前所在分支
## 同步修改
[BeyondCompare](https://civpub.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/%E5%B7%A5%E5%85%B7/Beyond%20CompareHA.7z)工具对比自己本地代码和从Gitlab clone下来的代码,将本机的改动手动更新到本地Git working copy
[BeyondCompare](https://civgit.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/%E5%B7%A5%E5%85%B7/Beyond%20CompareHA.7z)工具对比自己本地代码和从Gitlab clone下来的代码,将本机的改动手动更新到本地Git working copy
BeyondCompare工具我在本项目的工具文件夹中上传了,需要的可以自己[下载](https://civpub.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/%E5%B7%A5%E5%85%B7/Beyond%20CompareHA.7z),或者去网上找
BeyondCompare工具我在本项目的工具文件夹中上传了,需要的可以自己[下载](https://civgit.vicp.net:8443/wangjinbo/Svn-to-Git/blob/master/%E5%B7%A5%E5%85%B7/Beyond%20CompareHA.7z),或者去网上找
> 在这步操作过程中,我们优先同步自己修改的代码部分,对于代码内容存在差异的,如果是我们自己改的,能够判断哪边最新,就可以手动同步,如果不是我们修改的,不能判断的情况下,保留原样,不做修改,以Git目录为准就可以了
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment