how to clean up untracked files on git status

  • Posted on: 26 January 2015
  • By: oon
git status --porcelain

as you may know, add it to .gitignore file.

but how to add them all at once?

here you go..

git status --porcelain | grep '^??' | cut -c4- >> .gitignore

[1]http://stackoverflow.com/questions/11542687/git-how-to-ignore-all-presen...

Tags: 

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.