Create your forked Pagure repo
Go to the Pagure repo you want to fork (for example \https://pagure.io/fedora-docs/quick-docs/). We will refer to this as the ''upstream'' repo from now on.
Click the '''Fork''' button at the top.
Copy the contents of the '''SSH''' box. If you don't see an '''SSH''' box then that means you don't have an SSH key listed in your Pagure profile. Before you go on to the next step make sure to generate one by following https://docs.pagure.org/pagure/usage/first_steps.html#upload-your-ssh-key[these] instructions.
Add your fork to the local checkout
From a terminal, go to the directory you cloned above. (For example: `cd $HOME/fedora/docs/quick-docs`)
From that directory, run `git remote add origin <SSH URL>`. (For example: `git remote add origin ssh://git@pagure.io/forks/bcotton/fedora-docs/quick-docs.git`)
This document uses the terminal for git commands. However, you may also choose to use a graphical git tool. The principles of the workflow are the same.
Before every contribution
Before you start making your contributions, you want to make sure you're up-to-date with the upstream repository. This means you are making changes to the latest version.
Ensure you're in your master branch with `git checkout master`
Get the upstream changes with `git pull`
This assumes the repo you're editing uses `master` as the main branch. Some repositories may have a different workflow. Check with the team if you're not sure.
If you use the web view of your forked repo, you will want to push the updated content to your fork. Do this with `git push origin master`.
Making a contribution
It's better to create a new branch even if you don't need it than to wish later that you had created a branch because you're trying to clean up conflicts. Make branches for even the most trivial contributions and you'll avoid that potential heartbreak.
Now it's time to make the contribution you came here to make. You'll want to start by creating a new branch to do the work in.
`git checkout -b ''branch_name''` (where ''branch_name'' is something like `issue8-fix_typos` or `add_git_tips_for_writers`)
You can name a branch whatever you want. Descriptive names are good, especially if it's something you'll be working on over several sessions. If you're working directly on the upstream repo, using a unique and descriptive branch name helps other contributors know what your branch is.
You can check your current branch with `git branch`. Your current branch will have a `*` at the beginning of the line. If you need to switch to an existing branch, use `git checkout ''branch_name''`.