public void UndoFileChanges(string filename)
{
using (var repository = GetRepository())
{
CheckoutOptions options = new CheckoutOptions { CheckoutModifiers = CheckoutModifiers.Force };
repository.CheckoutPaths("HEAD", new string[] { filename }, options);
}
}