blob: e30458b408ff41699f11880b969435bf89cf9b6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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
|