Git Pristine: How to Pristine Clean Your Dirty Git Repository


I found this command useful and I love this alias!

git pristine, a command that will wipe any dirt on your local git copy, any untracked files, and the cache will be removed to make it pristine clean as the remote origin.

Now, each time you messed up your repository, you can execute this command to hard reset and clean all the cache:

$ git pristine

No need to re-clone that big repository again. Have a nice day!


Leave a Reply

Your email address will not be published. Required fields are marked *