tags:

views:

53

answers:

1

I'd like to set up some rules in my .gitignore whereby any directory or file with a name containing "_nogit" will be ignored.

Examples:

  • ../videos_nogit/...
  • bigvideo_nogit.mp4
  • assets/_nogit/bigvideos...

Thanks--

+2  A: 

If you have a line in your .gitignore file that does not have slashes in it, then git treats it like a shell glob pattern. Thus, adding *_nogit* to your .gitignore will ignore all of those files.

See also the gitignore man page.

CanSpice