Run any commands in Terminal (Mac or Linux) or git-bash (Windows). Make sure to replace anything in braces.
-
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. -
Find an issue:
- Go to the issues tab of a project you think sounds interesting! Most repos have a label like good-first-issue.
- Good list of projects you can filter by language: codetriage.com
- All open issues with hacktoberfest on Github: https://github.com/topics/hacktoberfest
- Another good list of projects: https://github.com/mungell/awesome-for-beginners
-
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 andsrc
for FOLDER:
cd {PATH}
mkdir {FOLDER}
cd {FOLDER}
- 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):
git clone {LINK YOU COPIED}
cd {REPO NAME}
- 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}
- 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"
- Push:
git push origin {BRANCH}