To look at/download BobaBoard's code, check out our guide to Setting Up your Coding Environment. You might also be interested in Git Notes

0. Create a fork

If you haven't been explicitly added to the repository you're contributing to, you will need to create a "fork" you own and upload the changes there before opening a pull request (aka "please, BobaLord, merge my code into the official BobaBoard codebase", see Git Notes ). Unless you know what you're doing and have forked before running git clone, follow these instructions to change your clone into fork.

  1. Go to the github website (you must be logged in) and click on the fork button at the top-right corner of the repository you want.

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/46f333ad-f08f-403c-a6d4-eefefbbe077c/Untitled.png

  2. Take note of the new git address of your forked repository. It should be something like https://github.com/YOUR-USERNAME/BOBABOARD-REPO.git. You can find it on the main page of your new forked repo, under code.

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/22ef05a2-089c-497e-a341-7c6dc609c5a1/Untitled.png

  3. Run the following commands from your terminal, in the root folder of the repo that you want to upload.

git config --get remote.origin.url | xargs git remote add upstream
git remote set-url origin [YOUR NEW REMOTE URL HERE]
git fetch

At this point, you can proceed with the regular flow for a pull request.

1. Create a branch off of master for your new feature

In the folder for your forked repository (see step 0) run

git branch -f new-feature-name
git checkout new-feature-name

Of course you can swap new-feature-name with whatever string represents what you're trying to do.

<aside> 👁️ TIP: if you want to work on multiple changes at the same time, you can maintain different branches with separate code (see Git Notes). Just run the code above to create another branch, and you can then switch between branches using git checkout my-branch. Code changes aren't shared between branches.

</aside>

2. Write code

Write the most revolutionary piece of code the world has ever seen. Once you're done, commit it (basically, create a checkpoint) to your repository by running:

# Add all the modified files to the present commit
git add .
# Actually commit all the added files
git commit -m "this is a description of what my whole commit is about"
# Push your changes to the github website (remote repository)
# on the new-feature-name branch
git push origin new-feature-name

<aside> 👁️ TIP: you can do this multiple times as you code to split your work in "logical segments". This is good practice, but don't feel too bad if you commit everything together because BobaLord is also extremely bad at clean commits and will not judge you.

</aside>

3. Create a pull request on Github

Once you're done, it's time to open a pull request (again, also known as "please, BobaLord, merge my code into the official BobaBoard codebase"). To do so: