Github Submission Guide#
1. Save your work#
From the menu at the top of the notebook, select Restart kernel then Run all to check that your code runs without error. Then Save the notebook.
Make sure the notebook is in the github repository folder corresponding to that assignment (e.g. ps03.ipynb should be in the folder assignments-gitusername/PS01)
1b. Before submitting, check that the top directory of your current VS Code session is your assingments-
2. Submitting Code - (Option 1)#
Uncomment the code in the final cell of the notebook and run that cell. This will commit and submit your work.
2. Submitting Code - (Option 2)
Open the Source Control panel on the left toolbar.
Write a descriptive comment in the message bar.
The blue COMMIT button has an drop down menu on the right. Select “Commit & Push” from that menu.
You may be asked something about staged files, click ‘Always’.
Staging files If your file is not being committed: - check that you’ve saved it - check whether it is ‘staged’.
Staging files tells git that you would like to track those files to later commit and push them. You can do this manually. Locate the file under “Changes” (see the screenshot above). If a file is unstaged, it will have a ‘+’ to the right of the filename in Source Control. Click that ‘+’ to stage a file before committing.
2. Submitting Code - (Option 3)#
You can also drag and drop files into Github from your browser.
First, navigate to the correct Problem Set (or Project) folder. In the upper right, click “Add file” then select “Upload files” from the dropdown.
You should then see a screen like this. You can drag and drop your file(s) onto the drop zone. To commit, write a message and hit the green “COMMIT” button.
3. Verify the submission#
Go to your GitHub repository in a web browser. Open the assignments folder and navigate to the folder that should have your submitted assignment. Github provides a preview of the file; if that looks right, you’re good to go.