How do I push files specified in .gitignore?

后端 未结 2 1009
抹茶落季
抹茶落季 2021-01-02 20:47

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?

2条回答
  •  一整个雨季
    2021-01-02 21:13

    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.

提交回复
热议问题