WARNING: This guide is a work in progress and will continue to evolve over time. If you have content to contribute, please refer to this document each time as things may have changed since the last time you contributed.
This warning will be removed once we have settled on a reasonable set of guidelines for contributions.
Forking is a simple two-step process.
- On GitHub, navigate to the https://github.com/RedHatGov/redhatgov.workshops repo.
- In the top-right corner of the page, click Fork.
That's it! Now, you have a fork of the original RedHatGov/redhatgov.github.io repo.
Right now, you have a fork of the redhatgov.workshops
repo, but you don't have the files in that repo on your computer. Let's create a clone of your fork locally on your computer.
git clone [email protected]:your-username/redhatgov.workshops.git
cd redhatgov.github.io
# Configure git to sync your fork with the original repo
git remote add upstream https://github.com/RedHatGov/redhatgov.workshops
# Never push to upstream repo
git remote set-url --push upstream no_push
3 Verify your remotes
To verify the new upstream repo you've specified for your fork, type git remote -v
. You should see the URL for your fork as origin
, and the URL for the original repo as upstream
.
origin [email protected]:your-username/redhatgov.workshops.git (fetch)
origin [email protected]:your-username/redhatgov.workshops.git (push)
upstream https://github.com/RedHatGov/redhatgov.workshops (fetch)
upstream no_push (push)
Get your local master
branch, up to date:
git fetch upstream
git checkout master
git merge upstream/master
Then build your local master
branch, make changes, etc.
git fetch upstream
git merge upstream/master
6 Commit your master
git commit
Likely you'll go back and edit, build, test, etc.
7 Push your master
When ready to review (or just to establish an offsite backup of your work), push your branch to your fork on github.com
:
git push
8 Submit a pull request
- Visit your fork at https://github.com/your-username/redhatgov.workshops.git
- Click the
Compare & Pull Request
button next to yourmaster
branch.
At this point you're waiting on us. We may suggest some changes or improvements or alternatives. We'll do our best to review and at least comment within 3 business days (often much sooner).
If you have upstream write access, please refrain from using the GitHub UI for creating PRs, because GitHub will create the PR branch inside the main repo rather than inside your fork.