Skip to content

Instantly share code, notes, and snippets.

@joe-warren
Created August 25, 2022 22:26
Show Gist options
  • Select an option

  • Save joe-warren/8400fe3684249de0ceb832a68b663434 to your computer and use it in GitHub Desktop.

Select an option

Save joe-warren/8400fe3684249de0ceb832a68b663434 to your computer and use it in GitHub Desktop.
Move untracked files in git into a subdirectory
mkdir junk
for file in $(git ls-files --others --exclude-standard); do mv "$file" junk; done
@joe-warren
Copy link
Copy Markdown
Author

This will potentially overwrite files with the same name, so be warned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment