Git Revert Commit & Local To discard local changes and revert to the last commit.Syntax: git checkout -- file_name Example: git checkout -- ProgramJava Tags: GitGit Revert Commit & LocalLearn2Done July 8, 2023 by Learn2Done Git