2018-02-27 03:53:13 +00:00
|
|
|
**This is a temporary README. We'll restore the old README prior to PR upstream.**
|
2016-10-07 00:29:26 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
# Consul Connect
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
This repository is the forked repository for Consul Connect work to happen
|
|
|
|
in private prior to public release. This README will explain how to safely
|
|
|
|
use this fork, how to bring in upstream changes, etc.
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
## Cloning
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
To use this repository, clone it into your GOPATH as usual but you must
|
|
|
|
**rename `consul-connect` to `consul`** so that Go imports continue working
|
|
|
|
as usual.
|
2014-04-17 05:04:28 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
## Important: Never Modify Master
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
**NEVER MODIFY MASTER! NEVER MODIFY MASTER!**
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
We want to keep the "master" branch equivalent to OSS master. This will make
|
|
|
|
rebasing easy for master. Instead, we'll use the branch `f-connect`. All
|
|
|
|
feature branches should branch from `f-connect` and make PRs against
|
|
|
|
`f-connect`.
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
When we're ready to merge back to upstream, we can make a single mega PR
|
|
|
|
merging `f-connect` into OSS master. This way we don't have a sudden mega
|
|
|
|
push to master on OSS.
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
## Creating a Feature Branch
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
To create a feature branch, branch from `f-connect`:
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
```sh
|
|
|
|
git checkout f-connect
|
|
|
|
git checkout -b my-new-branch
|
|
|
|
```
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
All merged Connect features will be in `f-connect`, so you want to work
|
|
|
|
from that branch. When making a PR for your feature branch, target the
|
|
|
|
`f-connect` branch as the merge target. You can do this by using the dropdowns
|
|
|
|
in the GitHub UI when creating a PR.
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
## Syncing Upstream
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
First update our local master:
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
```sh
|
|
|
|
# This has to happen on forked master
|
|
|
|
git checkout master
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
# Add upstream to OSS Consul
|
|
|
|
git remote add upstream https://github.com/hashicorp/consul.git
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
# Fetch it
|
|
|
|
git fetch upstream
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
# Rebase forked master onto upstream. This should have no changes since
|
|
|
|
# we're never modifying master.
|
|
|
|
git rebase upstream master
|
2014-04-14 18:45:31 +00:00
|
|
|
```
|
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
Next, update the `f-connect` branch:
|
2014-04-14 18:45:31 +00:00
|
|
|
|
2018-02-27 03:53:13 +00:00
|
|
|
```sh
|
|
|
|
git checkout f-connect
|
|
|
|
git rebase origin master
|
|
|
|
```
|