# Facebook iOS University
## Submitting Assignments
This page explains the steps for submitting assignments via Github.
1. **GitHub Repository** => Create a new GitHub repository for each week's assignment.
* **Note:** Do not create a new repository if the assignment is a continuation of the same project from the previous week. In this case it's preferred to use the same repository for all weeks of the assignment.
* Add a .gitignore to your project to avoid storing compiled and local files in git.
* If needed, review how to work with Git and GitHub with this handy tutorial on using Git from the command line.
2. **README Template** => Every submission must be accompanied by a  using the readme template provided with the assignment.
* In your project repository, add a  file in the root directory that contains the contents of the README template for that assignment.
* If the assignment is a continuation of the same project from a preview week, add the new template to the end of the previous README instead of creating a new file.
* Make sure to check off the user stories you've completed.
3. **GIF Walkthrough** => Your  must also contain a GIF walkthrough using LiceCap of the app demonstrating how it works with the user stories completed. Imgur is a great service for hosting the GIF walkthrough and then linking to it from the README.
* When using Imgur, you can right-click on the gif and choose "Copy Image Address" to get the correct address. Make sure the address has a extension. If you end up with a url that has a  extension, removing the  and changing this to  will ensure the gif renders on GitHub.
4. **Make sure you've pushed all your latest code up to GitHub** => To check this, you can browse your repository on GitHub to make sure some of your latest changes are present there.
5. **Submit Assignment** => Once you have **completed all required user stories and added a README as described above** then you are ready to notify us that you are ready for an instructor review, go to the "Assignment Tab" for the project and click the "Submit" button on the right-hand side:

In the dialog that appears, enter the required information about your project:

Then press "Submit" at the bottom to finalize your submission. Note that **you can always update your submission at any time** in case you want to re-upload the GIF or update the hours spent.
**NOTE:** If you recorded your app walkthrough as a video file instead of a GIF then please use LiceCap to record a preview of the full video included in the project README.
### Ensuring your Submission is Valid
To ensure you get credit for your submission, review the following items:
1. Can you see your **latest code** on GitHub?
2. Does your README use the provided **readme template**?
3. When going to your main **repository page** on GitHub, can you see your README and does your **GIF walkthrough** start playing?
4. Does your app have all of the required User Stories?
### Assignment Scoring
Check out the project rubric for a detailed break down of how assignments are evaluated.
### Terminal Quickstart
#### Starting the Terminal
A quick primer on the terminal can be found in this guide. Open up the **terminal application** on your Mac by opening up your  folder, then open the  folder:

You can also use spotlight pressing "Cmd + Space" and then typing "Terminal". Now inside the terminal, we need to switch to your project folder, such as


Next, make sure the files look correct and the folders are listed from your app:

#### Repository URLs
There are two types of repository URLs, HTTPS and SSH:
* HTTPS: 
* SSH: 
The general workflow is the same for both URLs, but there are some differences in the specifics of commands.
#### SSH Setup
You'll first need to register your machine's SSH keys with your Github account. You only need to perform this step **once** for each machine you use.
Once you've added your SSH key, the SSH repository URL will look like  but for your username and project. You won't need to provide credentials (username/password) for any further git commands.
#### HTTPS Setup
There is no additional setup required for using HTTPS. However, you'll need to enter your username and password each time you run the  or  commands:

#### Pushing Code
To push your code, simply initialize your git repository and then connect the repository to your local project:

If the repository **is not setup**, then create the git repository with:

**Setup a .gitignore in the root of the directory** which prevents certain files from being committed.

Check if you **already have an origin** with the following command:

If the above command prints something out like below, then you have an existing origin connected.
Note the above URL is SSH, but it may also be an HTTPS URL.
You can remove the existing origin with:

Next, you want to add the remote repository for your Github repo:
**HTTPS:**

(remember to replace and with your user name and repo, respectively).
**SSH:**

(remember to replace and with your user name and repo, respectively).
Since you connected a new origin, you'll need to make sure your local repository is synchronized with the remote repository (). That is, you want to make sure your local repository has all of the files that are in the remote repository. You can do this with the pull command:

In the above command  is the name of the remote repo (which we added with the  step, and  is the name of the branch.
Sometimes the  command will need to merge updates from the remote repository into your local repository. As long as there are no conflicts, you don't need to worry about this automatic step. The  command may open a vi editor asking you to provide a comment. If you don't know vi, you can quit entering the key commands .
You can now add the files to git using the SourceTree client or by typing:

and now go ahead and push the code to Github with:

If you use the command:
 then you won't need to provide the  arguments anymore for this repository. The  flag tells git to set  as the default
repository and branch for all further commands, including .
You can also use your favorite Git GUI (for example SourceTree) to do a lot of this process as well.
### Git References
Additional references for Git:
* Official Git Tutorial
* Tensory's HowToGit