Ignoring the Git

I hate it when I run git status and all those files I don't want in version control show up in the 'Untracked files' list. The obvious answer is to create a .gitignore file, but I really don't want to do it by hand, because it just doesn't seem lazy enough. So, I present to you a way to generate the .gitignore file without having to type any of the file names:
 git ls-files -o --exclude-standard >> .gitignore
The first part of the command will generate a list of all the files that are not under version control and the second part just appends that list to the .gitignore file. Nice, easy and really lazy.

This entry was posted on Fri, 29 Aug 2008 02:20:38 GMT and Posted in . You can follow any any response to this entry through the Atom feed. You can leave a comment .
Tags ,


Comments

Leave a response

Leave a comment


weewar.com corner