I'm having a strange issue with Git. I use Composer to include TCPDF in my application, but I can't get it added to my repository.
Here's what I do step-by-step:
The status quo. These are just plugins; it's lacking the 'tcpdf' folder I need.
Now I run Composer to have it install the additional directory.
In this picture, it's already clear that something is wrong. Composer downloaded all files and folders and TCPDF is functioning on my machine, but only the tcpdf folder is shown red. The subfolders are not! I go to the command line and do 'git add .', so that it adds all files and folders. Now it looks like this:
Still wrong.
The wrong status is reflected by git status
:
I'm really stuck here. I have no idea how to tell Git that this isn't a file but a folder. My repo is perfect, but if my colleague updates he only gets this file, without the folder content.
How do I fix this?
No idea what was wrong, but I copied the entire contents of tcpdf
to a new folder called test
, committed that folder and its contents successfully, removed the tcpdf
-'file', committed, then renamed the test
-folder to tcpdf
and committed again.
Strange but all good now.