Skip to content

Latest commit

 

History

History
45 lines (36 loc) · 2.35 KB

YourFirstPR.md

File metadata and controls

45 lines (36 loc) · 2.35 KB

Run any commands in Terminal (Mac or Linux) or git-bash (Windows). Make sure to replace anything in braces.

  1. Check if git is installed by running git --version in Terminal or look for git-bash on Windows. If not installed download it at git-scm.com/downloads. If you wanna take a look at using Git from within Code or want a refresher, check out our Applying Git Concepts workshop from earlier.

  2. Find an issue:

  3. Fork the project on GitHub: git

  4. Make a folder on your computer where you want to store the source code. For example if you want a folder src in your user's home directory, use ~ for PATH and src for FOLDER:

cd {PATH}
mkdir {FOLDER}
cd {FOLDER}
  1. Clone. You can find the URL by going to your repo on GitHub and clicking "Clone or download", then insert the URL into the following command. Make sure you go to the repo your user owns (eg mkenigs) rather than the upstream one (eg VandyFOSS): clone
git clone {LINK YOU COPIED}
cd {REPO NAME}
  1. Branch. You can name your branch whatever you want, but it's common to call it fix-1234 where 1234 is the issue number on GitHub:
git checkout -b {BRANCH}
  1. Make changes to fix the issue using any IDE or text editor, stage (add) all files changed, and commit:
git add {FILES YOU CHANGED} # i.e. git add main.c otherfile.h
git commit -m "{DESCRIBE YOUR CHANGES HERE}"  # i.e. "Fix double click issue in debug window"
  1. Push:
git push origin {BRANCH}
  1. Open a Pull Request on Github. In your PR description, make sure to say your PR closes issue #1234. PR