Show Menu
Cheatography

Beginners guide to web-development Cheat Sheet by

Terminal

./
Current directory
../
Parent directory
cd {location}
Change directory
cd ../
Change to the parent directory
cd ../../
Go up two direct­ories
rm {location}
Delete a file
rmdir {location}
Delete a directory
rm -rf {location}
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­-status
Review the status of all vms
 

Git

git clone {repo} {location}
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_name}
Run a container, based on a Docker image
docker stop {conta­ine­r_name}
Stop a running container
docker start {conta­ine­r_name}
Start a stopped container
docker rm {conta­ine­r_name}
Remove a stopped container
docker rmi {image­_name}
Remove a Docker image
docker ps -a
See all containers

Docker Compose

docker­-co­mpose build
Build all services defined in docker­-co­mpo­se.yml
docker­-co­mpose up
Start all services
docker­-co­mpose stop
Stop all services
docker­-co­mpose 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.