I'd like to remove a cloned repo on disk using NGit, which is a port of JGit.
I've previously done this to clone a remote repo locally:
System.IO.Directory.CreateDirectory(someDir);
var clone = Git.CloneRepository().SetDirectory(someDir).SetURI(someRepoUri);
Git Repo = clone.Call();
I'd like now to delete that local directory containing that cloned repo.
I was receiving permission exceptions when simply calling System.IO.Directory.Delete()
when it reached the .git\objects\pack\*.idx
files. Perhaps this is just a side effect of running this on Windows Azure.
Is there an NGit command I can issue to have the .git
directory and all its contents removed by using functionality within NGit?