9

Is to possible to "purge" history from a given change set/date in TFS?

So, for example, For file X

destroy all version older than date Y.

or

destroy all version before revision Y.

STW
  • 44,917
  • 17
  • 105
  • 161
Simon
  • 33,714
  • 21
  • 133
  • 202
  • But the question begs . . . why do you want to destroy history? If you're concerned with saving space, there's a high likelihood that destroying the history will not regain you much, since only deltas are stored. – Robaticus Oct 19 '10 at 12:47
  • @Robaticus contemplating using TFS to store large binaries. I only need 3-4 versions. Figured if space or performance becomes an issue I could always purge. – Simon Oct 19 '10 at 21:51
  • 1
    that's a good reason for it. Keep in mind that TFS will still store deltas for binaries up to 16MB (as a default). – Robaticus Oct 20 '10 at 03:10
  • I want to delete history on a TFS instance I was testing in preparation for real code/work to be used on it, so it would be clean. I see a good use for it. – Alex Kwitny Oct 09 '15 at 19:00
  • We have automatic build set up for a solution with 300 projects. That creates 300 version updates for 300 AssemblyInfo files every checkin. We have millions of these entries sitting around. This causes merging changesets to take minutes just to open the window to pick the changeset. Hopefully this information is the magic bullet I need to fix the problem! – Brain2000 Apr 22 '16 at 13:44

1 Answers1

11

Yes you can - http://msdn.microsoft.com/en-us/library/bb386005.aspx -

TF Destroy $/MyTeamProject /keephistory /stopat:C864

Ewald Hofman
  • 12,688
  • 3
  • 39
  • 44
  • 2
    Hi Ewald, this doesn't actually answer what you're doing. What would one do in order to perform what the OP asked? I'd hate to ask the same question again just to get flagged... Basically, what commands would you run for keeping all changes of all files after c864, and vice versa. I can't tell what this placeholder command is doing as-written. Also, why keep history? The OP does not indicate they want to keep the history of the stuff being purged -- just the opposite. – kayleeFrye_onDeck Jul 07 '16 at 02:21