now let' see how to abandon change and revert back to the previous working state firstadd new line to hello_world pyhello_world py print("hello git world!"print("hello everyone "print("oh noi broke the project!"save and run this file we check the status and see that git notices this changegit_practicegit status on branch master changes not staged for commit(use "git add to update what will be committed(use "git checkout -to discard changes in working directoryu modifiedhello_world py no changes added to commit (use "git addand/or "git commit - "git_practicegit sees that we modified hello_world py uand we can commit the change if we want to but this timeinstead of committing the changewe want to revert back to the last commit when we knew our project was working we won' do anything to hello_world pywe won' delete the line or use the undo feature in the text editor insteadenter the following commands in your terminal sessiongit_practicegit checkout git_practicegit status on branch master nothing to commitworking directory clean git_practicethe command git checkout allows you to work with any previous commit the command git checkout abandons any changes made since the last commit and restores the project to the last committed state when you return to your text editoryou'll see that hello_world py has changed back to thisprint("hello git world!"print("hello everyone "although going back to previous state may seem trivial in this simple projectif we were working on large project with dozens of modified filesall of the files that had changed since the last commit would be reverted this feature is incredibly usefulyou can make as many changes as you using git for version control