Skip to content

Commit 76f2358

Browse files
authored
Merge pull request #80 from TheOnlyZac/TheOnlyZac-patch-1
Update beginner's guide
2 parents 724493a + bb9f60e commit 76f2358

File tree

1 file changed

+28
-17
lines changed

1 file changed

+28
-17
lines changed

docs/BEGINNERSGUIDE.md

+28-17
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,53 @@ Use a terminal or GitHub GUI to clone the forked repo to your machine.
1212

1313
**3. Create a new branch for your changes**
1414

15-
Navigate to the `sly1` directory and run the following command:
15+
Navigate to the `sly1` directory in the terminal, and run the following command:
1616

1717
```sh
1818
git checkout -b branch-name
1919
```
2020

2121
Replace `branch-name` with whatever you want to call your working branch. This will automatically create a new branch and switch to it.
2222

23-
**4. Write your code**
23+
**4. Write & match your code**
2424

25-
Write your code in the `src/P2` directory. You can use any text editor you like, but we recommend [Visual Studio](https://visualstudio.microsoft.com/downloads/).
26-
27-
**4b. Write test cases**
28-
29-
If you are adding new code, it is strongly recommended that you also write unit tests for it. See the [contributing guide](/docs/CONTRIBUTING.md#writing-tests) for more information.
30-
31-
**4c. Match your code**
32-
33-
You can follow the [Code Matching Guide](/tools/codematcher/README.md) to match your code against the Sly 1 May 2002 Prototype. This will tell you if your code is exactly the same as the original code. This is not perfect because the prototype is not the same as the final release, but it is still a good way to make sure your code is correct.
25+
Follow the [Contributing Guide](/docs/CONTRIBUTING.md) to find functions to match, and write your code. You can use any text editor you like, but we recommend [VS Code](https://code.visualstudio.com/).
3426

3527
**5. Commit the changes to your branch**
3628

37-
Whenever you feel you have reached a point where you would like to save your progress, you should *commit* your changes the working branch with the following command.
29+
Whenever you would like to save your progress to the fork, use these commands to add the files to a commit with a message describing what you did:
3830

3931
```sh
40-
git commit -am "What you did"
32+
git add file_you_changed.txt
33+
git commit -m "Describe what you did here"
4134
```
4235

43-
If you only want to commit certain files, first add the them to the commit with `git add <files>`, then commit with `git commit -m "What you did"`.
36+
If you don't care about adding specific files and just want to commit every file you changed, you can use this command instead:
37+
38+
```sh
39+
git commit -am "Describe what you did here"
40+
```
4441

45-
Use `git status` to see which files you've changed. If a file is red, it means that the file has been modified, but not added to the commit. If a filename is green, it means that the file has been added to the commit.
42+
The commits are not backed up to GitHub until you `git push` to the repo in the next step.
4643

4744
**6. Push the commits to your fork**
4845

49-
When you are done making commits, push your branch to your forked repo. Use `git push origin branch-name` to push your branch to your forked repository.
46+
When you are done making commits, push your branch to your forked repo.
47+
48+
```sh
49+
git push origin branch-name
50+
````
5051

5152
**7. Create a pull request on GitHub**
5253

53-
When you are have pushed all commits to your fork and are ready to submit your code, create a pull request on GitHub. Go to your forked repository on GitHub and click the "Pull requests" tab. Then click the "New pull request" button. Select your branch from the "compare" dropdown menu and click "Create pull request".
54+
When you are have pushed all commits to your fork and are ready to submit your code, create a pull request on GitHub.
55+
1. Go to your forked repository on GitHub and click the "Pull requests" tab.
56+
2. Click the "New pull request" button.3
57+
3. Select your branch from the "compare" dropdown menu.
58+
4. Click "Create pull request".
59+
6. Add a title and brief description stating what you did for the person reviewing it.
60+
61+
62+
**8. Wait for someone to review your code**
63+
64+
A code reviewer will review your PR and either merge it into the main branch, or let you know if there are any issues that need be addressed. If you need to fix something, any commits you push to the same branch will be automatically added to the pull request until it is merged, at which point you will have to make another pull request if you continue working.

0 commit comments

Comments
 (0)