Please set your Github username, your Slack username, and your Repl.it username to the SAME name.
This helps me keep track of which repo goes with which repl.it, and which repl.it goes with which slack user when you submit tasks.
Sign in to your Github account you created in the PFM Chapter 1 videos.
You're going to FORK this repository into your github account.
Click the Fork button on the top right.
- Once the repository has been forked, you're going to add a Collaborator:
matkatmusic
- Click Settings to access the repository settings. Click on Collaborators. Enter
matkatmusic
. - Click on my name to add me as a collaborator.
...letting me know you added me to the repo.
Github will send me an invite link but I might miss it, so DM me. You can proceed to the next section without waiting for me to accept the invite.
-
Visit https://repl.it/login
-
Sign up and use Github as the means of signing in. It will be the middle button on that page, in between Google's
G
and Facebook'sf
. When you pick a user name, please pick the same name that you use in Github/Slack -
Once you're logged in to Repl.it, click
Import Repo
on the upper right. If it prompts you to sign up for the Hacker plan, just click Cancel or click outside of the prompt. -
Repl.it may ask you to grant it permission to access your Github account. If so, grant it access.
-
You should see the repo you just cloned listed under your repositories. Choose that repo. Repl.it will clone your repo. You should see some text like this on the right-hand pane:
cloning into https://github.com/youraccount/pfmcpp_project1...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 6 (delta 0), reused 6 (delta 0), pack-reused 0
From https://github.com/youraccount/pfmcpp_project1
* [new branch] master -> origin/master
origin/HEAD set to master
HEAD is now at 1badb5c Initial Commit
-
Once Repl.it finishes cloning your repo, click the
Invite
button. -
invite
matkatmusic
as a collaborator via theSearch by username
field at the bottom of the popup.
...letting me know you added me to the repl.it.
- Click on the file browser on the left, and select
main.cpp
.
-
Once I accept your invite to collaborate on GitHub and Repl.it, I will edit
main.cpp
and add the assignment. -
Once I commit and push the assignment, I'll be waiting on you to do the work.
-
Refresh the Repl.it page, switch to the version control view on the left, and click "pull" when it prompts you to update.
-
in
Repl.it
, you can make a branch[+]
via the Source Control widget on the left. Make a branch -
complete the assignment instructions. Do not delete the instructions.
-
This course loosely follows the JUCE Coding Standards: https://juce.com/discover/stories/coding-standards The easiest way to show the coding style is with a short snippet:
//no spaces around '(', spaces around '=', variable names are relevant
bool rentACar(int rentalDuration, int carType = 0)
{ //curly braces go on their own line
ignoreUnused(rentalDuration, carType); //indentation is set to 4 SPACES. set this in Repl.it settings
return true;
}
//a blank line between functions or types.
struct RelatedType //Types begin with a capital letter and use CamelCase
{
double val, optimalVal; //member variables use camelCase, and begin with a lowercase letter.
//a blank line between member variables and member functions
void setTypeToRelateTo(const OtherType& typeToRelateTo); //member functions follow the same style guide as regular functions
};
Set the repl.it indentation to '4' in the repl.it settings on the left.
-
Once you complete the instructions, or if you get stuck, commit your changes on the branch. If Repl.it prompts you that it is Unable to connect to this GitHub repository, click the 'Connect' button. Make a small change (like adding a space somewhere) and try commiting again. You can click on the commit message itself to be shown the commit in your Github repo.
-
Send me a Direct Message in Slack that you committed your completed assignment, including the link to your Repl.it
-
I will review the assignment.
- If it's completed to my satisfaction, I will ask you to go to Github and create a
Pull Request
. - If it's not completed to my satisfaction, I will add some
FIXME
's to the code which will break compilation. You'll need to read the error messages, fix the code, and commit your changes, which I will then review.
- If it's completed to my satisfaction, I will ask you to go to Github and create a
-
Click on
Pull Requests
in your repo. -
Click the
[Compare & Pull request]
button for your recently pushed branch.- Make sure it says
Able to merge
on the page that appears. - You can enter a message if you want.
- Make sure it says
-
On the right side,
- under Reviewers, request 'matkatmusic'. By doing this, you are requesting that I review your code.
- under Assignees, assign 'matkatmusic'. By doing this, you are assigning me the task of reviewing your code.
-
Click 'Create pull request'. After the pull request is created, Do not click 'Merge pull request'.
-
Wait for me to merge it, since you assigned it to me.
-
Once I merge the PR, I will either
- clear out the instructions and replace them with new instructions on the
master
branch, or - Ask you to create a new project from this template, following the same steps as before.
- clear out the instructions and replace them with new instructions on the
-
if I replace the instructions, You will then make a new branch for these new instructions, and repeat the process.
-
if I ask you to create a new project, I also want you to share your completed task to the appropriate channel. To do this:
- a) visit your Repo on github
- b) click on
Commits
- c) in the list of commits, look for the one I merged
- d) Look for the
[<>]
on the right. If you hover over it with your cursor, it will sayBrowse the repository at this point in the history
- e) Click on it. the url will change to something like
pfmcpp_project1/tree/654abd564d65b4c5645e654f654g
. - f) Share this URL in the channel for the task, as your completed task for other students to look at.
-
"Here's my completed task: https://github.com/.../tree/123456789abcdef"
- g) Finally, remove me as collaborator from the github repo and repl.it