Permalink
Newer
100644
55 lines (37 sloc)
1.56 KB
1
# Contributing to Cockroach
2
3
We use [Phabricator](http://phabricator.andybons.com/) for code reviews. Phabricator
4
uses your GitHub credentials, just click on the "Login or Register" button. The Phabricator
5
development model is similar to the GitHub pull request model in that changes are
6
typically developed on their own branch and then uploaded for review. When a change is
7
uploaded to Phabricator (via `arc diff`), it is not merged with master until
8
the review is complete and submitted.
9
10
+ Hack away...
11
+ Commit your changes locally using `git add` and `git commit`.
12
+ Upload your change for review using `arc diff`.
13
14
## Installing Arcanist
15
To install Arcanist (the code review tool)...
16
17
Create a dir that will hold the two repos required.
18
19
`$ mkdir somewhere`
20
21
then clone the required repos into that folder:
22
23
```
24
somewhere/ $ git clone git://github.com/facebook/libphutil.git
25
somewhere/ $ git clone git://github.com/facebook/arcanist.git
26
```
27
28
Then add somewhere/arcanist/bin/ to your $PATH
29
30
Now within the cockroach directory...
31
32
```
33
$ git checkout -b newbranch
34
... make changes ...
35
$ git commit -a -m 'my awesome changes'
36
$ arc diff
37
```
38
39
Say you’ve updated your diff to account for some suggestions, you just commit those on the same branch and do:
40
41
```
42
$ arc diff
43
```
44
45
again and it will take care of uploading things.
46
47
Once you’re ready to land a change (it has been approved).
48
49
```
50
$ arc land
51
```
52
53
it will squash all commits, update the commit message with the original headline and description, and have a link back to the review. It will also clean up (delete) your feature branch.
54