```html CI/CD Cheat Sheet

CI/CD Cheat Sheet

Git Commands

  • git clone [url]: Clone repository
  • git pull: Update local repo
  • git branch: List branches
  • git checkout [branch]: Switch branch
  • git add .: Stage all changes
  • git commit -m "[message]": Commit changes
  • git push origin [branch]: Push changes

Docker Commands

  • docker build -t [name] .: Build image
  • docker run -p [port]:[port] [name]: Run container
  • docker ps: List running containers
  • docker stop [container_id]: Stop container

Jenkins Commands

  • java -jar jenkins.war: Start Jenkins
  • java -jar jenkins.war --httpPort=[port]: Start Jenkins on specific port
  • java -jar jenkins-cli.jar -s [jenkins_url] help: Get help

Best Practices

  • Use version control
  • Run tests on a clone of production environment
  • Use feature branches
  • Automate deployment process
  • Monitor application and server health
```