Week 2 · Session 1
Moving around your computer by typing instead of clicking.
Two ways to do the same thing. Use whichever you remember.
Ctrl + `control + `The names are abbreviations, and most of them are built on the word directory.
pwd is print working directory: the full path of the folder you are in nowls is list: the files and directories inside the working directorycd NAME is change directory: it moves you into the folder called NAMEcd .. moves you up one level, into the directory that contains youpwd. It prints your exact locationls. It prints what is in that locationcd .. to move up one level at a timecd with nothing after it returns you to your home directory. is not shown by lsls -a lists all entries, including those-a is an option: extra instructions for the commandls displays itls -a to see themmkdir NAME is make directory: it creates a folder called NAME inside the working directorycd NAME afterwards if you want to go insidels to confirm the folder is actually thereSet Up Now
One folder for the course, with a subfolder for activities and one for labs. Everything you download this semester goes into one of the two.
cmpsc100/activities/labs/Type these one per line, pressing Enter after each.
pwd check where you are before you create anythingcd Desktop or wherever you keep your courseworkmkdir cmpsc100 create the course foldercd cmpsc100 move into itmkdir activities then mkdir labsls you should see both subfolders listedInstall Now
We did not install this in the Week 1 setup, so we are doing it now.
git-scm.com/download/winxcode-select --install and accept the promptgit --versionNext
Cloning downloads a copy of a repository, and remembers which GitHub repository it came from.
git clone URL downloads the repository into your working directorycd into the right place before you run itactivities/, lab repositories go in labs/ls afterwards to confirm the new folder is theregit add FILE marks a file to be included in your next savegit commit -m "what I changed" saves a snapshot of those files on your computer, with a short notegit push uploads your saved snapshots to GitHub