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
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
.
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.
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.
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.
master
for your new featureIn 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>
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>
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: