halcwb
halcwb

Reputation: 1480

Need to clone repo after using bfg repo-cleaner or pull on existing?

Reading the instructions for bfg repo-cleaner, the work flow seems like:

  1. clone the repo using the --mirror option
  2. strip the repo from unwanted items using bfg
  3. use git gc to physically remove the items
  4. do a push of the cleaned repo

However, then it is unclear to me whether you need to remove your own copy of the working directory and do a fresh clone, or whether you can just do a pull to get the clean repo/history? At the moment I am the only one who uses the repo.

Upvotes: 6

Views: 1388

Answers (1)

Roberto Tyley
Roberto Tyley

Reputation: 25304

You'd be better off doing a fresh clone, as your old working directory will have dirty history that you don't want to risk pushing back into your newly cleaned repo.

Upvotes: 5

Related Questions