Made with ♥ by VCUarts
Contributers: Mark Luetke & Cody Whitby
A terminal is an interface for typing text based commands.
Efficiency, Efficiency, Efficiency.
Most modern professional web development tools are command line based. Not knowing even the most basic terminal commands is a serious handicap.
It's not hard.
Everything is going to be fine.
X-Code must be installed. Available for free in the App Store.
$ cd
$ ls
$ mkdir
$ touch
$ open
Change directory
#change to root directory
$ cd ~
#change to myproject directory
$ cd github/projects/myproject
#move back a single directory
$ cd ..
#move back three directories
$ cd ../../../
Tip: use TAB to autocomplete
List directory contents
$ ls
aDirectory anotherFile.txt aPic.jpg
myFile.txt file.txt
create a new directory
#create mydirectory within the current directory
$ mkdir mydirectory
create a new file
#create mynewfile.txt within the current directory
$ mkdir touch mynewfile.txt
open a file or directory
#open the current directory in finder
$ open .
#open textfile.txt with it's the default program
$ open textfile.txt
#open textfile.txt with pages
$ open -a pages textfile.txt
Terminal Cheatsheet for Mac ( basics )
There are many more commands that exist, so many that it is possible to work exclusively from the command line.
Like many things in web development, this is yet another very deep rabbit hole...Git is an open source program for tracking changes in files
Git saves the entire history of a project allowing you to restore to any point. It pretty much makes efficient collaborative programming possible and you WILL need to understand it if you do any sort of professional development work with a team.
Efficiency, Efficiency, Efficiency. Professional developers live in their terminal and the command line is the native implementation of Git.
$ git init
$ git status
$ git add
$ git commit
$ git fetch
$ git pull
$ git push
creates a .git directory
$ git init
displays the status of our repo, any changes, new files, deleted files, etc.
$ git status
tell git to track new files
$ git add filename.txt
$ git add .
take a snapshot of changes and new files
$ git commit
$ git commit -m "message describing the changes"
check a remote repo for changes
$ git fetch
pull down any changes from a remote and apply them to the local project
$ git pull
add any commits to the remote repo
$ git push
$ git init
$ git add .
$ git commit -m "initial project commit"
First you must create a new project on GitHub
$ git remote add origin http://yournewprojecturl.com/something.git
$ git push origin master
After making changes to a project
$ git status
$ git add .
$ git commit -m "message about what we changed"
$ git push
Pull down a project to use locally
$ cd directory/you/want
$ git clone https://github.com/user/project.git
# or clone into a folder with a different name
$ git clone https://github.com/user/project.git new-folder
Made with ♥ by VCUarts
Contributers: Mark Luetke & Cody Whitby