Git keeps deleting files

294 views
Skip to first unread message

SJW

unread,
Apr 11, 2022, 2:02:17 AM4/11/22
to git-for-windows
This issue has occurred 4 times with the last 4 commits and I have no idea how to stop it and it is becoming increasingly frustrating.

Composer files are being deleted from within my project within /vendor/composer

Each time I merge a branch, I go to check the application and get an error:
Fatal error: require(): Failed opening required '\vendor\composer/autoload_static.php' (include_path='.;C:\php\pear') in \vendor\composer\autoload_real.php on line 33

In .gitignore I have the following lines so not sure why these files are ever being touched:

/vendor/
composer*

So I then go to the live site, copy the files back into the /vendor/composer folder and check the site is up and running again.
Then I run `git status` which shows:

On branch master
nothing to commit, working tree clean


Then I check out a new branch, make modifications, commit and merge the branch and I am back to square one...
Fatal error: require(): Failed opening required '\vendor\composer/autoload_static.php' (include_path='.;C:\php\pear') in \vendor\composer\autoload_real.php on line 33

How can I tell git to ignore these files.  Do not touch them and especially, NEVER delete them... 

I still manually apply changes to the live site using WinMerge with the git repo versus the LIVE site because I can't trust git
Reply all
Reply to author
Forward
0 new messages