To start, you will need a "fork" of a GitHub repository. In this case, we will use platformer3x. This will create a copy of the repository to save your changes to the code without them being saved on the original (so that we don't accidentally break Mr. Mortensen's code). You will only need one of these per team.
To do this, navigate to a repository and click the fork button on the top-right.
Fill in the name/description however you want
Invite your team members as collaborators through the settings section on GitHub.
Next, you can clone your new fork in VSCode and start coding! Hurrah!!
Saving your Changes
Most of this should be review, but after making a change to your cloned fork, you should stage changes in Source Control and commit them with a message.
Next, if you are working with others, you should run git pull in the terminal (ctrl + `) to make sure you are up to date with the changes made by your team.
Now, you can safely sync changes to your repository.
After, it's good practice to make sure you're up to date with the upstream repository (Mr. Mort's) by running git pull origin main
Making a Pull Request
Before having our changes saved on Mr. Mortensen's original repository (platformer3x), you will need to make a pull request, which is a way of requesting to have your code uploaded to the original.
Add a title and description to your pull request. This part is very important to make sure the maintainers know what you are trying to change so we can avoid breaking the code. You generally want to talk about what changes you are making with code blocks and images as examples.
To create headers, you can use varying amounts of hashtags before your text. More hashtags = smaller text. For example, the header of this section was written like this:
### Headers
Code Blocks
But how did I make the code block for the previous section? With backticks! (`)
You can use sets of three to create large code blocks, with the language of the code defined (to automatically color it) next to the backticks like so:
``` javascript
// your code here!
function example() {
return true
}
```
You can also use pairs of backticks in single lines to have this effect.
Images & Links
To hyperlink things in Markdown like this do this:
[Text](url)
To do images, do the same thing but with an exclamation point in front. However, you usually just copy/paste or drag & drop images into the issue.
Making a Fork
To start, you will need a "fork" of a GitHub repository. In this case, we will use platformer3x. This will create a copy of the repository to save your changes to the code without them being saved on the original (so that we don't accidentally break Mr. Mortensen's code). You will only need one of these per team.
Saving your Changes
Next, if you are working with others, you should run
git pull
in the terminal (ctrl + `) to make sure you are up to date with the changes made by your team.Now, you can safely sync changes to your repository.
After, it's good practice to make sure you're up to date with the upstream repository (Mr. Mort's) by running
git pull origin main
Making a Pull Request
Before having our changes saved on Mr. Mortensen's original repository (platformer3x), you will need to make a pull request, which is a way of requesting to have your code uploaded to the original.
Here are some example pull requests:
GitHub Formatting Tips
Headers
To create headers, you can use varying amounts of hashtags before your text. More hashtags = smaller text. For example, the header of this section was written like this:
Code Blocks
But how did I make the code block for the previous section? With backticks! (`)
You can use sets of three to create large code blocks, with the language of the code defined (to automatically color it) next to the backticks like so:
You can also use pairs of backticks in single lines to have
this effect
.Images & Links
To hyperlink things in Markdown like this do this:
[Text](url)
To do images, do the same thing but with an exclamation point in front. However, you usually just copy/paste or drag & drop images into the issue.
![Alternate text](image_url)