shilang 发表于 2018-1-12 16:34:03

配置文件管理

$ vim nginx.conf  $ git add .
  $ git commit -m "test hooks"
test hooks
  1 file changed, 1 insertion(+)
  $ git push deploy # 此处如果想直接全部提交到远程仓库进行如下配置
  ########
  git remote set-url --add --push origin http://gitlab.product.co-mall:10080/liuyulong/process_configure.git
  git remote add both root@172.31.4.123:/software/workspace/project
  git remote set-url --add --push both http://gitlab.product.co-mall:10080/liuyulong/process_configure.git
  git remote set-url --add --push both root@172.31.4.123:/software/workspace/project
  git push both
  ########
  Counting objects: 4, done.
  Delta compression using up to 4 threads.
  Compressing objects: 100% (4/4), done.
  Writing objects: 100% (4/4), 457 bytes | 0 bytes/s, done.
  Total 4 (delta 1), reused 0 (delta 0)
  # 以下都是自定义 hooks 脚本返回的信息
  remote: .
  remote: 来自 /software/workspace/project
  remote:    7c07381..7b05314master   -> origin/master
  remote: 更新 7c07381..7b05314
  remote: Fast-forward
  remote:nginx/nginx.conf | 1 +
  remote:1 file changed, 1 insertion(+)
  remote: pull successful 172.31.4.123
  To root@172.31.4.123:/software/workspace/project
  7c07381..7b05314master -> master
  lonny@LonnyLiuMacPro ~/Documents/process_configure/nginx (git)- %
页: [1]
查看完整版本: 配置文件管理