Developer Cheatsheets
Quick reference guides for common development tools and commands
Git Commands
Basic Commands
git init
Initialize a new Git repository
git clone <url>
Clone a repository
git status
Check status of working directory
git add .
Add all changes to staging
git commit -m "message"
Commit staged changes
git push
Push commits to remote
git pull
Fetch and merge changes from remote
Branching
git branch
List all branches
git branch <name>
Create a new branch
git checkout <branch>
Switch to a branch
git checkout -b <branch>
Create and switch to new branch
git merge <branch>
Merge branch into current branch
git branch -d <branch>
Delete a branch
Undoing Changes
git reset HEAD~1
Undo last commit (keep changes)
git reset --hard HEAD~1
Undo last commit (discard changes)
git revert <commit>
Create new commit that undoes changes
git checkout -- <file>
Discard changes in working directory
git stash
Temporarily save changes
git stash pop
Restore stashed changes