I'd like TDS / GIT / Visual Studio to ignore, forget, delete all my ancient, un-commited work.

And pull a new branch fresh, complete, as if I had a new laptop.

But no, a lot of time spent already and I still have sticky traces of previous interactions. I want and need this out. I was considering deleting the underlying Windows folders but there's got to be an easier way?

Welcoming any help..

  • To clarify; these "sticky traces" you refer to - you mean leftover (and now untracked) files in the file system or?
    – Mark Cassidy
    May 24, 2017 at 14:06
  • 4
    I'm voting to close this question as off-topic because it belongs on the StackOverflow site May 24, 2017 at 17:14
  • When you say TDS, do you mean TFS? May 24, 2017 at 18:33
  • Thank you Mark, I mean branches. And whatever in the background, prevents me to locally delete these. Thank you Pete, TDS is Team Development for Sitecore, and integrates in GIT / Visual Studio. This is a Sitecore project as a whole, and since I'm not too sure yet which does what (it'll come eventually;) I thought the Sitecore channel to be relevant. Thanks ;)
    – JRG
    May 24, 2017 at 20:46

1 Answer 1


As a side note, this has nothing to do with Sitecore.

From the git command line, you can can navigate to the repository root and execute this command:

git reset --hard

Alternatively, you can also do this from Visual Studio:

  1. Open the Team Explorer
  2. Go to Branches
  3. Right click on the currently checked out branch
  4. Choose Reset -> Delete Changes

The outcome is the same: all modified, added or untracked files (apart from the files under the .git folder) will be deleted.


After you clean up your repository folder, you should of course get the latest version — for that you can use git pull from the command line, or the Sync tab in Visual Studio.

  • Thank you Dmytro, I believe part of the problem is that my TDS (Team Development for Sitecore) projects under the solution, have been out of sync for a while and maybe part of the issue with GIT.
    – JRG
    May 24, 2017 at 20:51
  • ... (continued..) When I right click the only 1 left under "Published Branches", I've got the contextual menu: "Switch (greyed-out) - Unpublish Branch - New Branch - Merge... - View History... - Delete (greyed out) I haven't seen a "Reset -> Delete Changes I'll try the command line then. Thanks much, awesome precision.. YEs it's exactly that, cleaning it all locally, then pulling afresh from our GIT site.
    – JRG
    May 24, 2017 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.