Assignments
Assignments are part of Metamation Academy’s intensive course on programming fundamentals. These assignments give the participants an opportunity to self-evaluate their level of understanding and put new concepts into practice.
How to push Academy assignments for review
Pre-requisites:
-
GitHub account
Sign in to GitHub
-
In your browser, open GitHub URL.
-
Provide your user credentials in Username or email address and Password fields.
-
Click the Sign in button.
Creating a Git repository
-
On the Dashboard page, Click the drop down button available on the top right corner of the screen to see list of options.
-
Click New repository option.
-
Type Assignment under Repository name field and provide a short Description (optional), if required.
-
Choose Public option for your repository.
-
Press Create repository button.
| In the Owner’s field, you must select your GitHub Username. |
Git
Clone repository to local
-
Copy the remote repository path.
-
Initiate command prompt from your Assignment local file folder that you wish to push.
-
Type
git clonecommand along with copied repository path.
Creating a git branch
-
In command prompt, type
git switch --create A02to create and switch to a new branch (A02).
| Make sure you do not push any files directly to the main branch. |
Add files to assignment folder
-
Copy Program.cs file to the Assignment folder.
-
Type
git add Program.csto add the .cs file to local git.
Commit files
-
Type
git commit -mand add some description within "double quotation marks".
Push branch to origin
-
Type
git push --set-upstream origin A02to push the branch to GitHub server.
| This has to be done whenever a new branch is created. |
Once the remote GitHub repository is set as the upstream target for the new Git branch, git push or pull operations can be performed normally with a simple git push origin command.
|
Create pull request for review
-
Go to GitHub Assignment repo and click Pull Request.
-
In the Pull request page, click New pull request option to compare and review between different branches and commits.
-
Select A02 branch to compare and review the assignment with main branch.
-
Leave a short comment about the pull request and click Create pull request.
-
Add reviewer details and set the pull request for review.