TFS Pending Changes – Ignoring Files which are Identical to the Originals

Since posting about TFS a few weeks ago, I noticed I’ve received a lot of Google traffic in relation to a specific TFS annoyance I mentioned; the fact that when you view pending changes or check in files for a solution, it presents you with a slew of files that you’ve checked out at some stage, but haven’t actually modified. If you do a Compare on them, TFS will tell you “The files are identical”. Well since then, I’ve figured out how to purge these unwanted squatters.

You need to install TFS Power Tools and execute tfpt uu /noget /r * in the root of the branch. As a result, TFS will go through and undo checkouts for any unchanged files whilst leaving your modified files untouched. TFS is silly!

This entry was posted in Version Control and tagged , , , , , . Bookmark the permalink.

14 Responses to TFS Pending Changes – Ignoring Files which are Identical to the Originals

  1. Sajagi says:

    Thanks for the tip, Nathan. Most appreciated!

  2. Mari says:

    Thе laѕt time I stumbleԁ across a sіte this
    fаѕcinatіng іt cost me a girlfгienԁ
    i’m sure, I spent so much time on it.

  3. Esko Woudenberg says:

    I had a couple dozen pending changes that I was not ready to check in for our solution but ended up checking out the solution so I could add 2 projects with full source as a dependency instead of using just pre-built dlls. Then I was stuck with THOUSANDS of items in our solution flagged as being checked out to me EVEN IF NONE OF THEM WAS CHANGED. Can’t believe we were suckered into paying for another half-baked Microsloth product AGAIN… (TFS needs some SERIOUS HELP)
    In any event thanks for the above tip. Helped me avoid hours of useless busy work!

  4. Another option is to “Undo Checkout” all the changes, and clicking “No to All” when asked to confirm for undo checkout. This way Visual Studio will “undo checkout” all the files that are not changed, and all the changed files will remain checked out. I always use this method.

    BTW, thanks for your useful post.

    • Nathan Pitman says:

      Ah, I used to use that method and it was actually the original one I posted. But then I replaced it with the Power Tools version when I discovered that it undoes renames.

    • Hamid says:

      I just test it and it works grate. Thank you for this simple solution and Thank Nathan too.

  5. Jason Hurley says:

    This is a really easy fix to a really frustrating problem. Thanks!!

  6. Drew says:

    I think Microsoft needs to be a better company and build smarter tools.

  7. Vinay Sarvankar says:

    Thanks a million man…you saved my life.

  8. Evan Roberts says:

    After seriously trying to switch over to TFS from Subversion our organization switched back to Subversion. We found TFS to be over-engineered, overly-complicated, brittle, and inefficient when compared to products such as Subversion and GIT. I would recommend Subversion or GIT over TFS any day depending on your need. The only reason I would use TFS is if the organization forced me to do so. You can use TFS to get the job done for the most part. The question is why, since there are at least two far superior products you could be using for free that will improve your efficiency and outlook on life in general.

    • earnest says:

      What Evan Roberts said.

      I have a list of ‘red flags’ to ask companies when interviewing. It’s mostly based on Joel Spolsky’s “The Joel Test”, but I am going to add “Do you use TFS” as a follow-up to “Do you use source control?” — and deduct 2 points for if they do use TFS. TFS is an anti-pattern for source control. It may not be a deal killer but it’s not a good sign.

      You all have heard of “code smell”; call this a “corporation smell”.

  9. Erich Mühsam says:

    Even if this tip is a few years old, it had the ability to save my life too, 🙂 – Thanks!

  10. Sam S says:

    Thank you!! Great post.

  11. Pingback: Downsides of checking in files that have no changes? – Windows Questions

Leave a Reply

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