This repository will be updated weekly. Perform a 'git pull' on a regular basis to verify you have the latest files.
Note: These commands have to be run from inside the python-class repository (folder) on your local machine from the commandline. You will need to open a terminal to the folder. See video here for a how-to: TODO ADD VIDEO
- Update your local copy of the class files with any new files from this repository.
git pull
- If you have modified any files in the classwork folder and you want to reset them back to their original state use the following command
git checkout -- classwork
- If you want to reset the entire folder you have two options:
- Delete the folder completely and re-clone the repository.
git clone https://github.com/chris-lansman/python-class.git
- Perform a "hard reset"
git reset --hard
- Delete the folder completely and re-clone the repository.
Each week you will be expected to upload the homework assignment by Friday morning.
You will "push" your changes to this repository to the corresponding classwork/week# folder.
Your file name should be in the format LastName_FirstName_HW_Week#.py
ex) Lansman_Chris_HW_Week2.py
Tutorial video here: https://drive.google.com/file/d/1VnX7EDE3oEiNmAyv73IK_6biTxCreIxz/view?usp=sharing
- Create the file you will save your code in down in the corresponding /python-class/student-hw/week# folder
- Once you have finished the file and verified it runs save your changes.
- Prepare the file for push (upload) to the repository here on gitlab
- From the command line:
- Create a new branch to hold your change
git checkout -b my_branch_name
- Add your file to your local copy of the repository.
git add student-hw/week#/LastName_FirstName_HW_Week#.py
- Add a comment as to what this change is.
git commit -m "Adding my HW assignment for week 3 to the repository"
- Create a branch to be pushed (non-admin users cannot push directly to the main branch)
git checkout -b my_branch_name
- Finally "push" (upload your change to the this remote repository).
git push
If you have made it this far with no error messages.
Congratulations!
At this point you have uploaded your homework assignment for the week and are done.
As a last step so you dont forget change back to the main branch
git checkout main