axil's blog
  • Home
  • Categories
  • Tags
  • Archives

git others

I've written a git alias named:

git others

which lists files unknown to git. What it actually does is:

git ls-files --exclude-standard -o

It can be used to move unnecessary files to some trash folder:

git others | xargs -I{} mv {} trash/

On windows it's slightly different:

git others | xargs -I"{}" mv {} trash/

Installation:

git config --global alias.others "ls-files --exclude-standard -o"
  • « How to open .ipynb file with one doubleclick on Windows
  • Django templates to Jinja2 dictionary »
Comments
comments powered by Disqus

Published

Feb 13, 2017

Last Updated

2019-12-16 00:41:49.246579+07:00

Category

software

Tags

  • git 2
  • linux 2
  • untracked 1
  • windows 3
  • Powered by Pelican. Theme: Elegant by Talha Mansoor