user45220
user45220

Reputation: 61

How can I make git track a folder?

I started a new project, and for some reason git is ignoring a one specific folder:

git check-ignore -v -- /static/assets/vendor/jquery/dist/jquery.min.js

fatal: Could not switch to '/static/': No such file or directory

even though the directory is clearly there. Git is tracking nearly every other folder and file under the /static/assets folder, except this jquery folder.

I have no idea how to get this folder/file under version control. any suggestions would be greatly appreciated.

Upvotes: 0

Views: 197

Answers (1)

Dennis
Dennis

Reputation: 32598

You have a / at the beginning of your path, so it is looking outside the git directory, try this instead:

git check-ignore -v -- static/assets/vendor/jquery/dist/jquery.min.js

Upvotes: 3

Related Questions