This cheatsheet provides essential Git commands for version control, repository management, and troubleshooting within a DevOps workflow.
git init
git clone <repository-url>
git status
git add .
git commit -m "Your commit message"
git push origin <branch-name>
git pull origin <branch-name>
git log --oneline
git branch <new-branch>
git merge <branch-to-merge>
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
git config --global color.ui auto
git config --global core.editor "code --wait" # For VS Code
git config --global init.defaultBranch main
git config --list