+ 2
How to undo the most recent commit in Git?
4 Respostas
+ 6
How to undo the specific file from the most recent commit ?
//find the previous version you want
1. git log --oneline <file>
//checkout the specific file to that version
2. git checkout <commit-id> <file>
//commit this change
3. git commit -m "Revert xxx file"
+ 4
How to undo the specific file from the most recent commit ?
+ 2
run: git reset HEAD~
+ 1
Nice tip! Thank you