Forking the Consul Repo
February 2, 2022 ยท View on GitHub
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/consulrepository andcdinto the folder - Make
hashicorp/consultheupstreamremote rather thanorigin:git remote rename origin upstream. - Add your fork as the
originremote. 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