Show Menu
Cheatography

Beginners guide to web-development Cheat Sheet by

Terminal

./
Current directory
../
Parent directory
cd {locat­ion}
Change directory
cd ../
Change to the parent directory
cd ../../
Go up two direct­ories
rm {locat­ion}
Delete a file
rmdir {locat­ion}
Delete a directory
rm -rf {locat­ion}
Delete a directory, and all of its content

Vagrant

vagrant up
Bring up a vagrant vm (build it, if not already built)
vagrant ssh
Acquire the command line of the vm
vagrant halt
Stop a vagrant vm
vagrant destroy
Remove a particular vm
exit
To exit from the vm, back to your host
vagrant global­-st­atus
Review the status of all vms
 

Git

git clone {repo} {locat­ion}
Clone a remote Git repository
git fetch
Fetch updates from a remote repository
git pull
Pull fetched updates into your working repository
git add -a
Add all unstaged changes to the stage
git commit -m "­{me­ssa­ge}­"
Commit all staged changes to the reposi­tory, with a message
git diff
Review all changes to the repository
git difftool
Diff in an external diff tool
git push
Push all unsychned commits to a remote repository
git checkout {branch}
Checkout a particular branch
git checkout -b {branch}
Create a new branch
git branch -u origin {branch}
Create the branch on the remote repository
git branch
List all of the local branches
git branch -D {branch}
Delete (locally) a branch
git stash save -u "­{me­ssa­ge}­"
Stage all changes (staged & unstaged)
 

Docker

docker build {Docke­rfile}
Build a Docker image, based on the Dockerfile
docker run {image­_name} --name {conta­ine­r_n­ame}
Run a container, based on a Docker image
docker stop {conta­ine­r_n­ame}
Stop a running container
docker start {conta­ine­r_n­ame}
Start a stopped container
docker rm {conta­ine­r_n­ame}
Remove a stopped container
docker rmi {image­_name}
Remove a Docker image
docker ps -a
See all containers

Docker Compose

docke­r-c­ompose build
Build all services defined in docker­-co­mpo­se.yml
docke­r-c­ompose up
Start all services
docke­r-c­ompose stop
Stop all services
docke­r-c­ompose rm -f
Remove all services
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.