Skip to content

Latest commit

 

History

History
112 lines (71 loc) · 3.24 KB

CONTRIBUTING.md

File metadata and controls

112 lines (71 loc) · 3.24 KB

Contributing to Code for Foco.

Introduction

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.

TL;DR Contributing Guide

  1. Fork this repository and clone your fork.
  2. Make a patch branch.
  3. Make changes, commit and push.
  4. Submit a pull request and your changes will be reviewed and merged.

Contributing Guide

First, fork the repository,

Next, clone your fork:

git clone <your fork url>

Navigate into the directory using cd.

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

Then, checkout a new branch from master:

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"
  • the -a command line option will automatically "add" and "rm" edited files.
  • the -m command line option will specify that your commit message follows in quotes.

When you are done making changes, push your changes on your branch to Github:

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 master branch:

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: