Permalink
Sep 7, 2014
Sep 7, 2014
Newer
100644
45 lines (29 sloc)
1.9 KB
3
### Getting and building
4
5
A working [Go environment](http://golang.org/doc/code.html) and [prerequisites for building
6
RocksDB](https://github.com/cockroachdb/rocksdb/blob/master/INSTALL.md) are both presumed.
7
```bash
8
mkdir -p $GOPATH/src/github.com/cockroachdb/
9
cd $GOPATH/src/github.com/cockroachdb/
10
git clone git@github.com:cockroachdb/cockroach.git
11
cd cockroach
19
If you are working on your own fork, see
20
[this tip](http://blog.campoy.cat/2014/03/github-and-go-forking-pull-requests-and.html)
21
on forking in Go, which ensures that Go import paths will be correct.
29
+ 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.
33
+ Then [create a pull request using GitHub’s UI](https://help.github.com/articles/creating-a-pull-request).
34
35
+ Address feedback in new commits. Wait (or ask) for new feedback on those commits if they are not straightforward.
36
37
+ Once ready to land your change, squash your commits. Where n is the number of commits in your branch, run
38
`git rebase -i HEAD~n`
39
40
and subsequently update your remote (you will have to force the push, `git push -f andybons mybranch`). The pull request will update.
41
42
+ 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,
43
`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.
44