首页 > 代码库 > Gerrit(1): Manage Projects
Gerrit(1): Manage Projects
# Connect To Gerrit Server
- ssh -p 29418 gerritRoot@192.168.0.254
#Create Branch By SSH
- ssh -p 29418 review.example.com gerrit create-branch myproject newbranch master
# Get Command Help
- ssh review gerrit --help
# Clone Git Repo
- git clone ssh://192.168.0.254:29418/xxx.git
# Auto Deal With Commit-ID
- scp -p -P 29418 gerritRoot@192.168.0.254:hooks/commit-msg .git/hooks/
- chmod u+x .git/hooks/commit-msg
# Commit Changes
- git commit
- git push origin HEAD:refs/for/<branch>
# 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>
#Repo State
- Active / Read Only / Hidden
# Use Postgresql
# Create a user for the web application within PostgreSQL
# Assign it a password
# Create a database to store the metadata
# Grant the user full rights on the newly created database
- createuser --username=postgres -RDIElPS gerrit2
- createdb --username=postgres -E UTF-8 -O gerrit2 reviewdb
Gerrit(1): Manage Projects
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。