Starting Work
git clone <url> # Download a repo
git pull # Update local code
git checkout -b feature # Create new branch
git status # See what changedMaking Changes
git add . # Stage all changes
git add file.js # Stage specific file
git commit -m "message" # Commit with message
git push # Upload to remoteBranch Management
git branch # List branches
git checkout main # Switch branch
git merge feature # Merge branch
git branch -d feature # Delete branchFixing Mistakes
git stash # Save work temporarily
git stash pop # Restore saved work
git reset --soft HEAD~1 # Undo last commit, keep changes
git checkout -- file.js # Discard changes to file
git revert <hash> # Undo a specific commit safelyNeed AI Help?
Stuck on a complex git situation? Describe it to our AI Code Assistant and get the exact commands you need.