GIT

版本开发流程图

Git flow

shell配置

~/.gitconfig
[user]
  name = xxx
  email = xxx@xx.com
[core]
  quotepath = false
[color]
  ui = true
[push]
  default = simple
[merge]
  tool = vimdiff
[alias]
  lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
  co = checkout
  ci = commit
  st = status
  br = branch
  mg = merge --no-ff --log
  mt = mergetool
[diff]
  tool = vimdiff
[filter "media"]
  clean = git media clean %f
  smudge = git media smudge %f
  required = true

GitLab 配置

# 安装
dpkg -i git.deb
# 修改配置
vim /etc/gitlab/gitlab.rb
# 查看配置
gitlab-ctl show-config
# 应用配置
gitlab-ctl reconfigure

显示所有hooks信息

#!/bin/bash
echo args $@
echo Running $BASH_SOURCE
set | egrep GIT
echo PWD is $PWD