I have very nested directories in a project, and I’m a lazy programmer.
Let’s say I have a file name EventEditor.foo I want to stage my file regardless of whether it’s in the root directory or ./src/holy/sweet/mother/of/baby/raptor/jesus/this/is/a/long/hiearchy/EventEditor.foo
My goal would be to be all, “Yo Git, add EventEditor” and bam. It stages it with me only having to type something like git add *EventEdi*. Is this possible? Or am I day dreaming?
If you would like to match a glob recursively when using
git add, start the glob you pass in togit addwith a directory name (such as.for the current directory), and make sure that the glob is in quotes so that Git can interpret it instead of the shell:git add "./*EventEdi*"A full example:
From the manual: