mirror of https://github.com/hashicorp/consul
1.1 KiB
1.1 KiB
Forking the Consul Repo
Community members wishing to contribute code to Consul must fork the Consul project
(your-github-username/consul
). Branches pushed to that fork can then be submitted
as pull requests to the upstream project (hashicorp/consul
).
To locally clone the repo so that you can pull the latest from the upstream project
(hashicorp/consul
) and push changes to your own fork (your-github-username/consul
):
- Create the forked repository (
your-github-username/consul
) - Clone the
hashicorp/consul
repository andcd
into the folder - Make
hashicorp/consul
theupstream
remote rather thanorigin
:git remote rename origin upstream
. - Add your fork as the
origin
remote. For example:git remote add origin https://github.com/myusername/consul
- Checkout a feature branch:
git checkout -t -b new-feature
- Make changes
- Push changes to the fork when ready to submit a PR:
git push -u origin new-feature