gh copilot suggest -t git 'undo last commit but keep changes staged'

Category: GitHub Copilot

gh copilot suggest -t git 'undo last commit but keep changes staged'

Get a git-specific command suggestion

-t git (or --target git) tells Copilot to scope its suggestion to git commands only. Copilot will suggest `git reset --soft HEAD~1`. Scoping improves suggestion accuracy for domain-specific tasks.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.