How can I click the files specified in .gitignore?

If I have a "vendors" directory in my .gitignore, is there a way to configure remote access that will receive this directory anyway when I click?

+6
source share
2 answers

I think that the functionality you are looking for can be achieved by having the branch used for deployment for your Cloud Provider.

Set up a dev branch that includes your .gitignore file, check your incremental work in this branch.

Merge the dev branch into the deploy branch, which does not contain a .gitignore file but contains a vendor directory.

After the merge is completed, click on the remote deployment server from the deploy branch.

+6
source

Your .gitignore file has nothing to do with clicking. It is used by things like git status and git add to figure out which files should be (or may be) part of a future commit. You can add things that are ignored with the git add command; it throws an error if you do not use the -f option:

 The following paths are ignored by one of your .gitignore files: somefilename Use -f if you really want to add them. fatal: no files added 

Once you have added the file to the repository, it will be moved along with any other changes.

+3
source

Source: https://habr.com/ru/post/922006/


All Articles