remove local changes git

Public

Warning message

We recommend you to assign at least one category to this snippet so you could easily navigate it in the future. Edit your snippet here.

remove local changes git

Get raw version
bash
  1. GIT
  2. # Danger! Wipes local data!
  3.  
  4. # Remove all local changes to tracked files
  5. git reset --hard HEAD
  6.  
  7. # Remove all untracked files and directories
  8. git clean -dfx
  9.  
  10. git pull ...