Cheat sheet - all essential commands
**Git**
git init Initialize a new repo
git clone Clone a remote repo locally
git status Show working tree status
git add . Stage all changes
git commit -m Commit staged changes with message
git log - oneline Compact commit history
git switch -c Create and switch to a new branch
git merge Merge branch into current
git stash Stash uncommitted changes
git stash pop Re-apply stashed changes
git revert Safely undo a commit
git tag v1.0.0 Tag the current commit
**GitHub / Remote**
git remote add origin Link local repo to remote
git push -u origin main Push and set tracking branch
git pull Fetch and merge remote changes
git fetch origin Fetch without merging
gh pr create Open a pull request via CLI
gh pr list List open pull requests
gh run list View GitHub Actions runs
**Docker**
docker build -t name:tag . Build image from Dockerfile
docker run -p 8000:8000 name Run container with port mapping
docker run -d - name x name Run container in background
docker ps List running containers
docker logs -f Follow container logs
docker exec -it bash Shell into a running container
docker stop Stop a container
docker rm Remove a container
docker images List local images
docker rmi Delete an image
docker compose up -d Start all services in background
docker compose down Stop and remove all services
docker compose logs -f Follow logs for all services
docker system prune Clean up unused images/containers
That's the full toolkit.
Git tracks it. GitHub shares it. Docker ships it. Together they form the backbone of every modern production AI system.
Top comments (1)
What you saying?