-
Notifications
You must be signed in to change notification settings - Fork 15
Class Assignments
In this guide we will set up your new local assignment repo (on your computer), create a remote assignment repo on your GitHub, and sync the local and the remote repos.
-
In your terminal or command prompt using the
pwd
andcd
commands, navigate to a directory that you would like to store your assignments repository in. -
From inside this directory, create a new directory using the
mkdir
command.mkdir cisc2350-assignments
-
cd
into your new assignments directorycd cisc2350-assignments
-
In your new assignments directory, initialize a git repository using the
git init
command. This will create a new git repo in the assignment directory. -
In the same directory, run the
touch
command to create a newREADME.md
file. This will create an emptyREADME
file so that we have something to commit.touch README.md
-
Run
git status
and you should see that you have added theREADME
file to your repository. -
Use
git add --all
to stage your changes for commit, preparing them to be saved. -
Run
git commit -m
with a commit message in order to save all of your changes and commit to your repo.git commit -m "initializing new assignments repository"
-
Now, in GitHub, create a new repository using the green
+
button that can be found in the top right corner. -
Give your new repo a name (cisc2350-assignments), a description, SET IT TO PRIVATE, and then click "Create repository."
-
You should be taken to your new repository page that has suggestions on what to do next. Where it says "...or push an existing repository from the command line" copy the first command that will add your GitHub repo to your local repo as a remote, and run it in your local repo.
git remote add origin YOUR_REPO_URL
-
Then, copy the second command that will push your local repo up to your GitHub repo and run it in your terminal.
git push -u origin master
-
Your local repository should now be reflected in your GitHub repo. Refresh your GitHub repo in the browser and you should now see your
README.md
file included in the main repo page. -
Make sure that you add me as a collaborator to your new assignments repo on GitHub.
Now that your local and GitHub repos have been set up, you can start structuring your repository directory to include your assignments. For each assignment, you should create a new directory with the format assignment#
with a lowercase "a", and no space between the number and the word "assignment". Inside of the assignment directory, you should be including any files and folders that are part of your assignment. For example:
cisc2350-assignments
├── assignment1
| └── bio.html
├── assignment2/
| ├── bio.html
| └── style.css
├── assignment3/
| ├── bio.html
| └── style.css
├── assignment4/
Make sure you put your previous assignments into your new assignment repo and push it all up to your GitHub.