How do I revert to a previous command in terminal?

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

Tìm kiếm

Back
Top