git reset --hard HEAD leaves untracked files behind

When I run git reset --hard HEAD, it's supposed to reset to a pristine version of what you pulled, as I understand it. Unfortunately, it leaves files lying around, as a git status shows a big list of untracked files.

How do you tell git "Just bring it back to EXACTLY what was in the last pull, nothing more, nothing less"?

Answers


You have to use git clean -f -d to get rid of untracked files and directories in your working copy.


Need Your Help

Collection cannot be null on SaveOrUpdate()

c# .net nhibernate exception-handling

I have a problem, when I try to save new User in database. My code:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.