Cheatography
https://cheatography.com
Terminal./
| Current directory | ../
| Parent directory | cd {location}
| Change directory | cd ../
| Change to the parent directory | cd ../../
| Go up two directories | rm {location}
| Delete a file | rmdir {location}
| Delete a directory | rm -rf {location}
| Delete a directory, and all of its content |
Vagrantvagrant 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 |
| | Gitgit 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 "{message}"
| Commit all staged changes to the repository, 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 "{message}"
| Stage all changes (staged & unstaged) |
| | Dockerdocker build {Dockerfile}
| Build a Docker image, based on the Dockerfile | docker run {image_name} --name {container_name}
| Run a container, based on a Docker image | docker stop {container_name}
| Stop a running container | docker start {container_name}
| Start a stopped container | docker rm {container_name}
| Remove a stopped container | docker rmi {image_name}
| Remove a Docker image | docker ps -a
| See all containers |
Docker Composedocker-compose build
| Build all services defined in docker-compose.yml | docker-compose up
| Start all services | docker-compose stop
| Stop all services | docker-compose rm -f
| Remove all services |
|
Created By
www.scottmebberson.com
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment