Basic Contribution Workflow¶
This is a straightforward guide to contributing to a project on GitHub.
Prerequisites¶
-
Set up SSH authentication for the command line.
-
Have a repository to contribute to.
-
For the sake of practice, you can create your own repository and use this workflow.
-
If you don't want to create your own repo, the Professional Linux Users Group has a repository specifically for this purpose: https://github.com/ProfessionalLinuxUsersGroup/GitPracticeRepo
-
Contributing to an Existing Project¶
These instructions are for creating a feature branch to make a contribution to an existing repository on GitHub that you do not own yourself.
1. Create a fork of the repository in the Github Web UI.¶
If you're using your own repository, you can skip this step.
2. Clone your fork of the repository.¶
3. Create a new feature branch.¶
4. Make your edits.¶
5. Stage your changes.¶
6. Commit your changes.¶
7. Push your changes to your branch on your fork.¶
8. Go to the GitHub web UI (back to your fork) and create a pull request from your fork.¶
A contributor with write access to the original repository will need to approve and merge your pull request.
Once that gets merged, continue on.
If you're doing this on a repository that you own yourself, you can merge the PR yourself by going to your repo -> Pull Requests -> click the PR you opened -> "Merge pull request."
9. Add original repo as a remote source¶
10. Pull from the updated original¶
Now your local clone is up to date and you gucci.