This guide explains how to set up your system to connect to the proper git repositories.
openshift/pipelines-docs
is a public GitHub repository that hosts the OpenShift Pipelines documentation.
- Installing Git
- Configuring Git
- Fork the upstream repository
- Add your SSH keys
- Updating repository URLs
- Accessing unmerged commits
- Additional resources
If using Fedora, open your terminal and enter the proper installation command.
For installation use:
Up to Fedora 21
$ yum install git
Fedora 22 and later
$ dnf install git
Once you have Git installed, set up your Git account.
- Open Terminal
- Set your name and email
$ git config --global user.name "<your-name>"
$ git config --global user.email "<your-email>"
TIP: The email you specify should be the same one found in your email settings. To keep your email address hidden, see Keeping your email address private.
- Set your Git defaults
$ git config --global pull.rebase true
$ git config --global push.default simple
Fork the openshift/pipelines-docs
upstream repository to create a copy under your own GitHub ID. Clone your forked repository to bring your GitHub repository files to your local machine. Your forked repository is now the origin
repository for your local files.
- Open a browser and navigate to the upstream repository located at https://github.com/openshift/pipelines-docs.git
- Click Fork located in the upper right under your profile icon.
- Select your user account for the location of the forked repository. This creates your own copy of the repository under your own GitHub ID.
NOTE: For more information on forking and cloning, consult the official documentation.
If you choose to use the SSH address for your clones, you will need to add an SSH Key to GitHub first.
- Open the Terminal.
- Check to see if you have a public SSH key:
$ ls ~/.ssh/
- If you do not have a key, generate one:
$ ssh-keygen -t rsa -C "<your-email>"
- Open your key in an editor:
$ cd ~/.ssh/
$ vi id_rsa.pub
- Copy the contents of the file to your clipboard.
- Visit https://github.com/settings/keys
- Click New SSH Key.
- Name your key and paste the contents of your key file.
- Click Add SSH Key.
If the upstream repository is moved, you can change the downstream URL by using the following command:
$ git remote set-url upstream https://github.com/<new upstream>
Use the following command any time you need to fetch the latest source code locally:
$ git fetch upstream
This is the process you can use if you need commits another writer has submitted that is not yet merged.
- Check out a new topic branch from upstream/master as you normally do.
$ git fetch upstream
$ git checkout -b <new-topic-branch> upstream/master
- If you have not yet added that writer’s remote repository, add it now.
$ git remote add -f <user> [email protected]:<user>/strimzi-kafka-operator.git
- Rebase to bring in the changes that are in that user’s outstanding
origin/<merge-request-branch>
branch.
$ git rebase <user>/<merge-request-branch>