Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php-ref folder delets on push to origin #56

Open
chrismec opened this issue Feb 14, 2020 · 7 comments
Open

php-ref folder delets on push to origin #56

chrismec opened this issue Feb 14, 2020 · 7 comments

Comments

@chrismec
Copy link

Hello, I dont think this is an issue with php-ref but i'm not sure how to fix it. I push vendor folder to origin (tsk, tsk, I know). When I do the php-ref folder never makes it. Do you have any idea how to keep this from happening? THnks

@twistedpixel
Copy link

Sorry if I’m stating the obvious but have you gitignored it?

@chrismec
Copy link
Author

I dont think so. The only gitignores I have in my project are the ones that came with the packages installed. I've run check-ignore on the digitalnature, digitalnature/php-ref and digitalnature/php-ref/ref.php and get no output. Git exclude file is empty also.

@chrismec
Copy link
Author

chrismec commented Feb 14, 2020

ahhh yissss. I finally found out what the issue was. dev-master packages are loaded as sub-modules which will never get committed I guess. Removed .git folder from php-ref, removed git cache for php-ref and then readded php-ref.
$ rm -rf /vendor/NAME_OF_DEPENDENCY/.git
$ git rm --cached /vendor/NAME_OF_DEPENDENCY
$ git add /vendor/NAME_OF_DEPENDENCY
Then added /vendor/**/.git to .gitignore to prevent future issues.

Thanks to this post for the help!

@twistedpixel
Copy link

I mean... committing your vendor directory is insane anyway lol. Why exactly do you want/need that in your repo?

@chrismec
Copy link
Author

I know, I know, paranoia I suppose. What if some package of some version disappeared from the universe forever or worse some package of some version changed without a corresponding version change? I could recover or get back going again with my local copy but if I just commit the vendor I dont have to worry about it. Plus I try to keep my dependencies low anywho so its not a real burden...

@twistedpixel
Copy link

What you could do instead is clone the repo for each of your Composer dependencies onto your development machine(s) and pull down the changes every so often. That way, if a package goes missing or something, you can reference it in your composer.json as a local repo.

@chrismec
Copy link
Author

oh, ive not played with local repo's yet. I'll check that out. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants