zoukankan      html  css  js  c++  java
  • Gerrit(1): Manage Projects

    1) Register an openid account

    2) Custom settings

    • set SSH pubkey
    • set username and email
    • other

    3) Update the IP address of remote repositories

    • git clone ssh://user_Name@gerrit_Server:SSH_Port/repo_Name.git    # 必须拥该 gerrit 远程库的 Read 权限

    4) Push code

    • git push origin HEAD:refs/for/branch_Name    # 必须有 Push 权限

    5) Autogenerate Chang-Id

    • scp -p -P SSH_Port gerritRoot@gerrit_Server:hooks/commit-msg .git/hooks/
    • chmod u+x .git/hooks/commit-msg

    6) Watch projects

    7) Review code

    8) Privilege and User management

    • gerrit 以用户组为基本单位划分权限

    9) Local documents

    10) SSH Ops

    • # Connect To Gerrit Server
      • ssh -p SSH_Port gerritRoot@gerrit_Server 
    • #Create Branch By SSH 
      • ssh -p SSH_Port gerritRoot@gerrit_Server gerrit create-branch myproject newbranch master
    • # Get Command Help
      • ssh -p SSH_Port gerritRoot@gerrit_Server gerrit --help

    11) Other

    • # Continue An Failed Commit
      • git commit --amend
    • #Push with bypassing Code Review
      • git commit
      • git push origin HEAD:refs/heads/master
    • #Import an existing history into a Gerrit project
      • # push it directly to refs/heads/<branch>     # 必须有 'Create References' 权限,通常由管理员执行
    • #Repo State
      • Active / Read Only / Hidden
  • 相关阅读:
    background-size ie8及以下不兼容的解决方案
    前端
    JavaScript ES(6-11)
    前端工程化
    前端安全漏洞与防范
    Vue源码思维导图
    项目流程总结
    typescript版数据结构与算法库
    tsconfig.json各项配置注解
    Sql server动态加载存储过程--分页
  • 原文地址:https://www.cnblogs.com/hadex/p/6802580.html
Copyright © 2011-2022 走看看