glob pattern matching in .NET

I like my code a little more semantic, so I wrote this extension method: using System.Text.RegularExpressions; namespace Whatever { public static class StringExtensions { /// <summary> /// Compares the string against a given pattern. /// </summary> /// <param name=”str”>The string.</param> /// <param name=”pattern”>The pattern to match, where “*” means any sequence of characters, and “?” … Read more

Recursively add files by pattern

You can use git add [path]/\*.java to add java files from subdirectories, e.g. git add ./\*.java for current directory. From git add documentation: Adds content from all *.txt files under Documentation directory and its subdirectories: $ git add Documentation/\*.txt Note that the asterisk * is quoted from the shell in this example; this lets the … Read more