From 2d0c238fcbd19d3b9e81352a9b88ca804e52d416 Mon Sep 17 00:00:00 2001 From: Hal Canary Date: Fri, 27 Jan 2017 13:33:55 -0500 Subject: experimental/documentation/gerrit.md NOTRY=true Change-Id: I5f429b48732ca99409cb923c2a3d7bf5f4189d24 Reviewed-on: https://skia-review.googlesource.com/7723 Reviewed-by: Hal Canary Commit-Queue: Hal Canary --- experimental/documentation/gerrit.md | 59 ++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 experimental/documentation/gerrit.md (limited to 'experimental/documentation') diff --git a/experimental/documentation/gerrit.md b/experimental/documentation/gerrit.md new file mode 100644 index 0000000000..e30458b408 --- /dev/null +++ b/experimental/documentation/gerrit.md @@ -0,0 +1,59 @@ +Using Gerrit without git-cl +=========================== + +setup +----- + + cd ...skia_source_dir... + + curl -Lo .git/hooks/commit-msg \ + https://skia-review.googlesource.com/tools/hooks/commit-msg + + chmod +x .git/hooks/commit-msg + + git remote set-url origin https://skia.googlesource.com/skia.git + + git config branch.autosetuprebase always + + +creating a change +----------------- + +1. Create a topic branch + + git checkout -b TOPIC -t origin/master + +2. Make some commits. + + echo 1 > whitespace.txt + git commit -a -m 'Change Foo' + echo 2 > whitespace.txt + git commit -a -m 'Change Foo again' + +3. Squash the commits: + + MSG="$(git log --format='%B' ^@{u} @)" + git reset --soft $(git merge-base @ @{u}) + git commit -m "$MSG" -e + +4. Push to Gerrit + + git push origin @:refs/for/master%cc=reviews@skia.org + + +updating a change +----------------- + + +1. Edit your commits more. + + echo 3 > whitespace.txt + git commit -a --amend --reuse-message=@ + +2. Re-squash if needed. + + +3. Push to Gerrit + + git push origin @:refs/for/master%m=this_is_a_message + -- cgit v1.2.3