Cheatsheet#Git#DevOps#VCS

Git Commands Cheatsheet

Essential Git commands for daily development workflow.

Git Essential Commands

Configuration

git config --global user.name "Your Name"
git config --global user.email "name@example.com"

Basic Workflow

| Command | Description | |---------|-------------| | `git init` | Initialize a repository | | `git add .` | Stage all changes | | `git commit -m "msg"` | Commit changes | | `git push` | Push to remote |

Branching

  • Create: `git checkout -b new-branch`
  • Switch: `git checkout branch-name`
  • List: `git branch`