Here is a list on commands and other cheats we learned and I can access easily here using this page as a ‘cheat sheet’
Terminology
- A-C-P (access commit push)
Terminal
- pwd (print working directory, tells me where I am currently)
- ls (list, lists what files are currently in the location and not hidden)
- ls -a (shows hidden files)
- command+k (clears terminal) or clear
- cd (change directory, cd TechEd/)
- cd TechEd/ (takes to TechEd/ file from current directory if it is there)
- cd (without anything else will take back to root directory)
- cd .. (go up one directory)
- tab autocompletes (eg type pict then tab to cd into Pictures)
- mkdir (make directory)
- mkdir hello (creates file called hello)
- rmdir (remove directory)
- rmdir hello (removes file hello)
- touch (creates new file from the terminal)
- code . (launches vscode)
- git clone (will clone reposertry from github)
- git clone git@github.com:QualityMermaid/TechEducationClone.git (make sure the link in github is the right code version. in this case its SSH)
VSCode
####
- adding comments in css on mac can use command+/
- depending on what file type your using it will auto change the syntax for you!
Commands for terminal
- ! (when using a blank html file can use ! to autofill in VSCode
- command+s (saves file. if the circle is white it means its not saved!)
- git status (will tell you the status of the file, red means untracked files)
- git add . (stages the enviroment)
- git commit -m “XXX”(add a message in the XXX for why you are commiting the code)
- git push (pushes my local code in git into github which is remote)
- command+c (with curser at the end of the line will copy whole line)
- command+v (with curser at the end of the line paste in new line)
Extentions
- Better Comments
- Error Lens
- ES7+ React/Redux/React-Native snippets
- ESLint
- Indent-rainbow
- Live Server
- Prettier - Code Formatter
- Thunder Client
- vscode-icons
html
- / (takes your to home. useful when linking files)
Links
w3schools - useful information for html and CSS
geeksforgeeks