Skip to content

Instantly share code, notes, and snippets.

@issuran
Created July 12, 2018 13:23
Show Gist options
  • Save issuran/b150f7404a87b55e3f68379ffdd25fe3 to your computer and use it in GitHub Desktop.
Save issuran/b150f7404a87b55e3f68379ffdd25fe3 to your computer and use it in GitHub Desktop.
When there is nothing to commit but still have facing issues with untracked files
git 2.11 and newer
git clean -d -fx .
older git
git clean -d -fx ""
-x means ignored files are also removed as well as files unknown to git.
-d means remove untracked directories in addition to untracked files.
-f is required to force it to run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment