Contributing to Code for Foco.
Everyone is welcome to come and contribute to our projects and improve Code for Fort Collins.
We use a fork / pull request workflow, a brief description can be found in our TL;DR; whereas, a more in depth guide is outlined in the Contributing Guide.
If for some reason you still feel lost, there are some resources related to the workflow that may help in the Git & Github Resources section.
- Fork the project repository and clone your fork.
- Make a patch branch.
- Make changes, commit and push.
- Submit a pull request and your changes will be reviewed and merged.
fork the repository,
git clone <your fork url>
Navigate into the directory using
Now we want to add the original repository we forked from as a remote upstream, this way we can sync back up with it later without deleting the fork:
git remote add upstream <original repository URL>
To confirm, let’s list our remotes:
git remote -v
checkout a new
git checkout -b my-fix-branch master
Make some changes! Any time you make a change be sure to
commit with a detailed message:
git commit -am "commit message here"
-acommand line option will automatically “add” and “rm” edited files.
-mcommand line option will specify that your commit message follows in quotes.
When you are done making changes,
push your changes on your branch to
git push origin my-fix-branch
Now submit a pull request! We’ll review the request and either accept it or ask you to make some changes.
After your pull request is merged, you can delete your branch on Github:
git push origin --delete
Switch back to your
git checkout master -f
And delete your local fix branch branch:
git branch -D my-fix-branch
Finally, update your fork with the master branch of the original repo:
git pull -ff upstream master
Git & Github Resources
If you are new to
git, Github has several tutorials on what a fork is, how to fork, configure a remote and sync with a remote repository:
They have a pretty great guide overall about a fork workflow:
This article includes how to configure a remote for a fork, and how to sync a fork with the original repo:
Finally, if you are not sure how to make a pull request, this article may help you: