show information about what a command does and how to use it
pwd
print working directory (print the path to where I currently am in the file system)
cd
change directory (this moves you, the viewer of the terminal, to a new location in the file system). You may use an absolute file path or a relative path where . is the current working directory and .. is the parent directory.
ls
list the contents of the directory
mkdir
make a directory
touch
create a new file
rm
delete a file (note: to delete a directory, add the option -r or -d)
cp
copy a file (note: to copy a directory you probably need to add an option (like -r))
mv
move a file or directory to a new location (note: this can also be useful for changing the name of a file/directory)
echo
print some text; often used in conjunction with other commands
cat
print the contents of the file
>
this is an operator: X > Y will redirect (send) the outputs of command X to Y; if Y exists, it this will overwrite the existing file.
>>
this is an operator similar to the above: X >> Y will send the outputs of command X to Y; if Y exists, it this will append to the existing file.
git
Glossary
Term
Meaning
repository
(also known as repo) the place where code is stored.
branch
a pointer to a commit
remote
a repository that is hosted by a web service
origin
the remote repository associated with a project
head
the last commit in the checked-out branch
staging area
the intermediate area where a change is added before it is committed
pull request
(also known as a PR) lets you get feedback on your code changes in GitHub
Commands
Note: you can add the --help flag behind any of these commands to find out more information about them including the arguments/options that can be passed in.
command
what it does
git commit
create a snapshot of changes made to a repository since last commit
git commit -m "MESSAGE"
create a commit ^ and add a useful message
git status
get the current state of the git repository
git log
get the commit history of the current repository & branch
git pull
bring the latest changes from the remote repository into your local repo
git push
send the latest changes from the local repository to the remote repo
git checkout BRANCHNAME
switch to the BRANCHNAME (fill this in) branch, i.e. update the repository's contents to match the tip of BRANCHNAME
git remote -v
list the remote(s) for the given local repository
HTML
Important HTML Tags
Tag
Purpose
Playground
<html> </html>
Creates an HTML document
<head> </head>
Contains the title of the document & other info that isn't displayed