Creating and Submitting Assignments with Github
(Note: this is a generic, shortened version of the more detailed instructions in PA01.)
Alert: there is a configuration issue with the git installation on ECN machines, which can make it tricky to clone your repository. Please see the supplemental instructions for a couple of workarounds.

Setting up GitHub

We will be using GitHub Classroom to manage homework submissions. Please sign up for a GitHub account at https://www.github.com if you do not already have one. This is the account you will use to create and submit all of your assignments this semester.

Email the Instructor and TA with your GitHub username and a subject line "ECE 26400 GitHub account" by Friday, January 13

Developing an assignment

1. Create a git repo for the assignment

Log in to your Github account. Then log in to ECE 264's Blackboard account, find the announcement for the current assignment and click on the link. This will create a repository on Github for the assignment. Make sure that the repository is called ECE264/[assignment name]-[your username here]

2. Clone the repository

Cloning a repository creates a local copy. Change your directory to whichever directory you want to create your local copy in, and type:

> git clone https://github.com/ECE264/[assignment name]-[your username here] [assignment name]

This will create a subdirectory called [assignment-name], where you will work on your code.

3. Periodically commit your changes

As you develop your code, you can commit a local version of your changes (just to make sure that you can back up if you break something) by typing:

> git add [file name that you want to commit]
> git commit -m "[describe your changes]"

To copy your changes back to Github (to make sure they are saved if your computer crashes, or if you want to continue developing your code from another machine), type:

> git push

If you do not push, the teaching staff cannot see your solutions.

Submitting an assignment

Once you have a version of your program that you want to submit, tag the current version of the code with the tag submission:

> git tag -a submission -m "Submission for [assignment name]"

And push it to GitHub:

> git push --tags

If you want to update your submission (and tell the grading system to ignore any previous submissions) type:

> git tag -a -f submission -m "Submission for [assignment name]"
> git push --tags

This will overwrite any other tag named submission with one for the current commit.