In order to contribute your code to the repository, a working Git installation, and an account on Pagure is required.
- Install and configure Git, if not done already.
- Install Git
- On Fedora/CentOS/RHEL/OpenSUSE by executing the following command on a terminal.
sudo dnf install git
- On Debian/Ubuntu/Linux Mint/KDE Neon/Pop!_OS by executing the following command on a terminal.
sudo apt install git
- On Arch/Antergos/Manjaro/Endeavor by executing the following command on a terminal.
sudo pacman -S git
- On Fedora/CentOS/RHEL/OpenSUSE by executing the following command on a terminal.
- Configure Git
- Set the author identity by saving the name and email address with the following command. Execute without the
--global
flag if the identity is to be retained only for the current repository.git config --global user.email "<your-email-address>"
git config --global user.name "<your-full-name>"
- Set the author identity by saving the name and email address with the following command. Execute without the
- Install Git
- If an account is not available, create one by visiting
https://accounts.fedoraproject.org
. Once done, log intohttps://pagure.io
to get started.
Go through the following steps in order to add your code to the repository.
- Using an internet browser of your choice, navigate to
https://pagure.io/fedora-websites
. - Click on the
Fork
button in the top right corner of the page, and a copy of the repository would be created in your Pagure account. - Now head towards the recently created fork by navigating to
https://pagure.io/fork/<your-username>/fedora-websites
. - An SSH public key needs to be added in order to push commits to the fork in an authorized manner.
- If there is an SSH keypair available already, copy the SSH public key to your clipboard.
- If there is no SSH keypair available already, generate one by using the
ssh-keygen -t rsa
command and copy the contents of the SSH public key file to your clipboard.
- Head towards the
Deploy Keys
section inSettings
by navigating tohttps://pagure.io/fork/<your-username>/fedora-websites/settings#deploykey-tab
. - Click on the
Add Deploy Key
button in the top right corner of the section to begin adding your SSH public key. - Paste your SSH public key in the box, enable the
Push access
checkmark and click on theAdd
button. - Now that the SSH public key is saved, head back towards the fork repository home by navigating to
https://pagure.io/fork/<your-username>/fedora-websites
. - Click on the
Clone
button in the top right corner of the screen and copy the SSH clone string from the popup, which looks like thisssh://[email protected]/forks/<your-username>/fedora-websites.git
. - Open up a terminal in a directory where the repository would be cloned.
- Execute the following command (with additional parameters if needed to accommodate custom-named SSH keypair files)
to clone the fork repository.
git clone ssh://[email protected]/forks/<your-username>/fedora-websites.git
- Navigate into the cloned repository and feel free to pick an IDE and code editor of your choice to start working on the code.
- Be sure to NOT work on the primary branch of the repository, which is
master
in this case. Keep the primary branch aside as a reference branch to create new branches out of and fallback to in case of scrapping. - Switch to a new branch and name it appropriately. For instance, a branch consisting of code for adding
responsiveness to the header navigation bar may be named as
fix-responsiveness-topnavbar
.git checkout -b <branch-name-according-to-what-would-be-worked-on>
- After on the working on the code, execute the following command to know about the changes made with additions,
removals and modifications made in the tracked and untracked files.
git status
- Stage the changes of similar kind by executing the following command to prepare them to be committed. Please note
that multiple changed files can be staged for single commit, but it is strongly recommended to keep dissimilar
changes as separate commits.
git add <file-that-was-changed>
- Commit the staged changes to the checked out branch of your locally cloned fork by executing the following command
while being sure that the commits made are signed. The commit message should be representative of the changes made
in the said commit and preferably be under 50 chars.
git commit -sm "<appropriate-commit-message>"
- In order to reflect the locally made changes to your remote fork, the changes must be pushed.
- If there is no upstream branch available for the currently checked out local branch - which is generally the case
when new branches are created locally, push can be made by executing the following command.
git push --set-upstream origin <branch-name-according-to-what-would-be-worked-on>
- Once an upstream branch is available for the currently checked out local branch - which is generally the case
after the above command has been executed, push can be made by executing the following command.
git push origin <branch-name-according-to-what-would-be-worked-on>
- If there is no upstream branch available for the currently checked out local branch - which is generally the case
when new branches are created locally, push can be made by executing the following command.
- Using an internet browser of your choice, open the
Branches
tab of theSource
section of your fork by navigating tohttps://pagure.io/fork/t0xic0der/fedora-websites/branches
to find your branch pushed. - Test the changes locally to confirm their working and make a pull request by clicking on the
Open Pull Request
button, located at the right-side of the recently pushed branch name. - Enter an appropriate pull request title and describe the changes made in detail with Markdown-compliant syntax. If
the pull request is draft, do reflect the same on the pull request title using a
WIP
tag to keep the pull request from getting merged before completion.