9

Is there any way to do something like git clean -d -x -f using GitPython?

I need to reset working directories and want to get rid of all unversioned files without deleting the whole folder (except for .git) and checking out again.

Paddre
  • 798
  • 1
  • 9
  • 19

1 Answers1

14

You can work around by using the git command directly, from gitpython

git = repo.git
git.clean('-xdf')
Marcus Müller
  • 34,677
  • 4
  • 53
  • 94