OLD | NEW |
1 # Introduction | 1 # Introduction |
2 | 2 |
3 Kai Wang (kaiwang@) and I (Jói Sigurðsson, joi@) experimented with something we
called “shift-based development” in the first half of Q1 2013 as a way to work c
losely together on a componentization that was hard to do in parallel. | 3 Kai Wang (kaiwang@) and I (Jói Sigurðsson, joi@) experimented with something we
called “shift-based development” in the first half of Q1 2013 as a way to work c
losely together on a componentization that was hard to do in parallel. |
4 | 4 |
5 I work from Iceland, which is 7 or 8 hours ahead of Kai’s location (Mountain Vie
w, California), depending on the time of year (daylight savings time is not obse
rved in Iceland). Kai and I were working on componentizing the Prefs subsystem o
f Chromium, and it was obvious early on that if we tried to develop in parallel,
we would step on each others’ toes very regularly and be forced to do often dif
ficult merges (due to e.g. moving files, renaming things, and so on). The idea c
ame up, since my normal work day ends right around the time Kai’s starts, why no
t do the development in serial instead. Although I often work an extra hour or t
wo later in the evening, that’s normally for responding to code review requests
and email and not so much for coding, so this way we’d be completely free of get
ting in each others’ way. | 5 I work from Iceland, which is 7 or 8 hours ahead of Kai’s location (Mountain Vie
w, California), depending on the time of year (daylight savings time is not obse
rved in Iceland). Kai and I were working on componentizing the Prefs subsystem o
f Chromium, and it was obvious early on that if we tried to develop in parallel,
we would step on each others’ toes very regularly and be forced to do often dif
ficult merges (due to e.g. moving files, renaming things, and so on). The idea c
ame up, since my normal work day ends right around the time Kai’s starts, why no
t do the development in serial instead. Although I often work an extra hour or t
wo later in the evening, that’s normally for responding to code review requests
and email and not so much for coding, so this way we’d be completely free of get
ting in each others’ way. |
6 | 6 |
7 The way we implemented this was we set up a bare git repository, and at the end
of the day, we would push whatever we were working on to this repository, and le
t the other know the status of things. This could be a single working branch, or
(more often) a pipeline of branches, plus a branch representing the SVN revisio
n we were based off of. To make this work, we were both using the unmanaged git
workflow. | 7 The way we implemented this was we set up a bare git repository, and at the end
of the day, we would push whatever we were working on to this repository, and le
t the other know the status of things. This could be a single working branch, or
(more often) a pipeline of branches, plus a branch representing the SVN revisio
n we were based off of. To make this work, we were both using the unmanaged git
workflow. |
8 | 8 |
9 The idea was, the next “shift” would pull down the pipeline of branches and cont
inue where the last left off, doing development on the last change in the pipeli
ne if it was incomplete, landing whatever changes could be landed, or starting a
new change in the pipeline if all of them were ready for review or ready to lan
d. | 9 The idea was, the next “shift” would pull down the pipeline of branches and cont
inue where the last left off, doing development on the last change in the pipeli
ne if it was incomplete, landing whatever changes could be landed, or starting a
new change in the pipeline if all of them were ready for review or ready to lan
d. |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 $ git add boo.txt && git commit -m . | 51 $ git add boo.txt && git commit -m . |
52 $ git push shiftrepo | 52 $ git push shiftrepo |
53 ``` | 53 ``` |
54 | 54 |
55 The shared repository is just a place where you share your branches; | 55 The shared repository is just a place where you share your branches; |
56 it is not a place where you do actual work. The actual work should be | 56 it is not a place where you do actual work. The actual work should be |
57 done in your separate local repositories, and you still use e.g. git | 57 done in your separate local repositories, and you still use e.g. git |
58 pull (which in our git svn repositories behind the scenes does a `git svn fetch`
etc. | 58 pull (which in our git svn repositories behind the scenes does a `git svn fetch`
etc. |
59 | 59 |
60 Shift-based collaboration won't work well (at least not with a | 60 Shift-based collaboration won't work well (at least not with a |
61 pipeline of branches) unless you are using an "unmanaged" git checkout | 61 pipeline of branches) unless you are using an "unmanaged" git checkout. |
62 (search for "unmanaged" on | |
63 [this page](https://code.google.com/p/chromium/wiki/UsingNewGit)). | |
64 | 62 |
65 ## Example Working Rules | 63 ## Example Working Rules |
66 | 64 |
67 For the branches we collaborated on, we set up some working | 65 For the branches we collaborated on, we set up some working |
68 rules. This may be a good starting set and it worked well enough for us, | 66 rules. This may be a good starting set and it worked well enough for us, |
69 but others could adapt these rules: | 67 but others could adapt these rules: |
70 | 68 |
71 a) We had a naming convention for pipelines of branches. E.g. you | 69 a) We had a naming convention for pipelines of branches. E.g. you |
72 might have branches named shiftrepo/p0-movemore and shiftrepo/p1-sync, | 70 might have branches named shiftrepo/p0-movemore and shiftrepo/p1-sync, |
73 where p1-sync's upstream branch is p0-movemore, and p0-movemore's | 71 where p1-sync's upstream branch is p0-movemore, and p0-movemore's |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 currently-open branches, and to discuss what might make sense for the | 140 currently-open branches, and to discuss what might make sense for the |
143 next branches to work on. | 141 next branches to work on. |
144 | 142 |
145 ## Random Commands | 143 ## Random Commands |
146 | 144 |
147 To push a local branch to shiftrepo: `git push shiftrepo localbranchname` | 145 To push a local branch to shiftrepo: `git push shiftrepo localbranchname` |
148 | 146 |
149 To push all "matching" branches (i.e. push the latest copy of | 147 To push all "matching" branches (i.e. push the latest copy of |
150 any local branch that has previously been pushed to shiftrepo): `git push shiftr
epo` | 148 any local branch that has previously been pushed to shiftrepo): `git push shiftr
epo` |
151 | 149 |
152 To delete a branch from shiftrepo, it's weird: `git push shiftrepo :branchname` | 150 To delete a branch from shiftrepo, it's weird: `git push shiftrepo :branchname` |
OLD | NEW |