工程化专题之git

1 svn:

  1)中心化版本控制,只有server知道版本的变化信息,push和pull需要联网

  2)server硬盘坏了怎们办

2 安装:

  1)git config –-global user.name ‘xx’

  2)git config –-global user.email ‘xx’

  3)ssh-keygen -t rsa -C '[email protected]' 生成密钥公钥,位于~/.ssh

3 常用命令:

  1)git status 查询当前状态

  2)git remote

    a) git clone

扫描二维码关注公众号,回复: 3700589 查看本文章

    b)git init

    c)git remote add origin url

    d)git push -u origin master

  3)git fetch/pull/push

  4)回滚:git reset --hard 提交版本号

        git push -f origin master

  5)git checkout

    a)切分支

    b)撤销本地修改

  6)git commit --amend

  7)git merge 合并分支

  8)git rebase 变基

 

9)git tag 

10)git alias 组合命令并起别名

11)git config --list

4 gitlab

5 git hooks

6 git-flow

猜你喜欢

转载自www.cnblogs.com/winner2016/p/9834448.html