1. 程式人生 > >Gerrit(1): Manage Projects

Gerrit(1): Manage Projects

grant heads create data tro -h sign hooks app

# Connect To Gerrit Server

  • ssh -p 29418 [email protected]

#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 [email protected]: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