Which .gitignore rule is making my file ignored?

When you add a file to git and you get:
The following paths are ignored by one of your .gitignore files: your-file

you can check which .gitignore rule makes the path ignored using:
git check-ignore -v your-file

git check-ignore checks if file (or list of files) is ignored by git, -v makes the output more verbose, adding a .gitignore file name and line.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s