Git yourself out of trouble. Using git to undo mistake via command line
Git has some amazing capabilities to help undo mistakes. Below are 8 common git mistakes and steps to fix them via command line. 1. Undo everything We made some changes but are not happy and want a clean working copy git command git restore . We are working on uncommitted changes. Running git restore will have all changes removed. 2. Get an older copy of a file (or) get a deleted file back We made a change to a file but now we want to restore it back to the previously committed version. git command ...