Sometimes we may want to revert the changes in the working tree. Let’s delete some files in the Rails project.
1. Delete the app/controllers folder
- rm -r ./app/controllers
2. Let’s check what i have just done by git status
3. Revert the changes
- git checkout -f
4. Check the working tree again by git status
Done =)
Reference: Ruby on Rails Tutorial – 1.3 Version control with Git