Mạnh Cường
Member
How do I revert to a previous command in terminal?
Answer
Undoing Your Last Commit (That Has Not Been Pushed)
Answer
Undoing Your Last Commit (That Has Not Been Pushed)
- In your terminal (Terminal, Git Bash, or Windows Command Prompt), navigate to the folder for your Git repo.
- Run this command: git reset –soft HEAD~ …
- Your latest commit will now be undone.