Twitter Ludum Dare One Game a Month github npm Youtube

Welcome to I'm Brian MacIntosh, and I am a game programmer in the Orange County area of Southern California. This site serves to host and distribute some of my games and my blog, below.

I have developed games and apps for the XBox 360, Windows PC, iPad, Amazon Alexa, and Windows 7 Phone. I'm particularly interesting in procedural generation, pixel art, and emergent gameplay, and I'm looking forward to developing more games with these technologies.

Blog RSS E-Mail

You are filtering on tag 'git'. Remove Filters
Previous Page | 1 total posts | page 1 of 1 | Next Page

.gitignore: permit only certain paths with negation

May 15th, 2014 @ 19:13
Tags: git, random

Today I was trying to create a .gitignore file for a project that has to live in the same directory as a number of different folders. I wanted the git repo to only include folders that start with the string heroscape, while excluding any other folder.

The gitignore man pages point out that you can negate a pattern by putting a ! in front of it. I didn't notice at first that this does not ignore anything that does not match the pattern. Instead, it re-includes any previously ignored paths that match the negated pattern.

So to achieve what I wanted, I had to do the following, first ignoring all folders, then re-including folders that begin with "heroscape".



Previous Page | 1 total posts | page 1 of 1 | Next Page