Git Command Generator
Generate git commands for common operations
Generate git commands for common operations
Create & switch branch
git checkout -b <branch>Merge branch
git merge <branch>Rebase onto branch
git rebase <branch>Stash changes
git stashPop stash
git stash popCherry-pick commit
git cherry-pick <commit>Reset to commit (soft)
git reset --soft <commit>Reset to commit (hard)
git reset --hard <commit>Amend last commit
git commit --amend -m "<message>"Squash last N commits
git rebase -i HEAD~<n>Delete local branch
git branch -d <branch>Delete remote branch
git push origin --delete <branch>Tag a release
git tag -a v<version> -m "<message>"Undo last commit (keep changes)
git reset HEAD~1View commit log (oneline)
git log --oneline -n <count>Clone a repo
git clone <url>Add remote
git remote add <name> <url>Fetch & prune
git fetch --pruneForce push
git push --force-with-leaseDiff staged changes
git diff --staged