Search code examples
gitgitignoregit-pushcomposer-phpphpfog

How do I push files specified in .gitignore?


If I have a "vendors" directory in my .gitignore, is there a way I can set up a remote that will receive that directory anyway when I do a push?


Solution

  • I think the functionality you're looking for can be achieved by having a branch used to deploy to your Cloud Provider.

    Setup a dev branch which includes your .gitignore file, check your incremental work into that branch.

    Merge your dev branch into your deploy branch which doesn't contain a .gitignore file but contains the vendors directory.

    once you've completed your merge, push to the deployment remote from your deploy branch.