Hi Frode,
The purpose of the initial '/' is to limit the ignore to only that directory. From the gitignore man page:
A leading slash matches the beginning of the pathname. For
example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
For example, if you have a Tupfile like this:
.gitignore
: |> touch %o |> generated.txt
We get a .gitiginore file that has:
/generated.txt
This is so it ignores the file "generated.txt" in the current directory. If we manually created a file called "generated.txt" in a sub-directory, we don't want git to ignore that file.
What was the actual problem you were seeing?
-Mike