Permalink
Nov 3, 2014
Sep 7, 2014
Sep 7, 2014
Newer
100644
57 lines (38 sloc)
2.43 KB
5
### Assumed
6
* A working GCC (on mac os x something like `xcode-select --install` will get you started)
7
* [Go environment](http://golang.org/doc/code.html)
8
* [prerequisites for building
9
RocksDB](https://github.com/cockroachdb/rocksdb/blob/master/INSTALL.md)
10
* [protoc](https://github.com/google/protobuf/releases)
11
* pkgconfig
12
* curl
13
14
If you're on Mac OS X, [homebrew](http://brew.sh/) can be very helpful to fulfill these dependencies.
15
17
mkdir -p $GOPATH/src/github.com/cockroachdb/
18
cd $GOPATH/src/github.com/cockroachdb/
19
git clone git@github.com:cockroachdb/cockroach.git
20
cd cockroach
25
### Style guide
26
We're following the [Google Go Code Review](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) fairly closely. In particular, you want to watch out for proper punctuation and capitalization and make sure that your lines stay well below 80 characters.
27
31
If you are working on your own fork, see
32
[this tip](http://blog.campoy.cat/2014/03/github-and-go-forking-pull-requests-and.html)
33
on forking in Go, which ensures that Go import paths will be correct.
41
+ When you’re ready for review, create a remote branch from your local branch. You may want to `git fetch origin` and run `git rebase origin/master` on your local feature branch before.
45
+ Then [create a pull request using GitHub’s UI](https://help.github.com/articles/creating-a-pull-request).
46
47
+ Address feedback in new commits. Wait (or ask) for new feedback on those commits if they are not straightforward.
48
49
+ Once ready to land your change, squash your commits. Where n is the number of commits in your branch, run
50
`git rebase -i HEAD~n`
51
52
and subsequently update your remote (you will have to force the push, `git push -f andybons mybranch`). The pull request will update.
53
54
+ If you do not have write access to the repository and your pull request requires a manual merge, you may be asked to rebase again,
55
`git fetch origin; git rebase -i origin/master` and update the PR again. Otherwise, you are free to merge your branch into origin/master directly or rebase first as you deem appropriate.
56