Skip to content

Instantly share code, notes, and snippets.

Last active October 26, 2016 22:02
What would you like to do?
How to Clean Dirty files from a Git Repository
  1. I made a backup of all branches and the bare repo ( zipped up and put on Dropbox of each directory )

git clone -b <branch> http://<gitlocation>

git clone http:<gitlocation>

git clone --mirror http:<gitlocation> (bare repo)

  1. I went into the regular clones ( not bare repo ) and deleted all the dirty files from the file system then I did git add . , made a commit and pushed the repo.

  2. Then I used the instructions on here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment