A
A
Anton2016-10-31 10:10:12
git
Anton, 2016-10-31 10:10:12

How to exclude git files from commit?

We use Bitbucket.
in .gitignore:

/includes/Smarty/templates_c/
/templates_c/

But! Old cache files are ignored by git, but if a new file is created in /includes/Smarty/templates_c/ then git tries to commit it, you have to manually click exclude from commit.
How to set up the project so that everything in the cache folders does not go into the repository and out of them?
Using the NetBeans IDE

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Miguel De Cervantes, 2016-11-10
@migs911

There are other options why this happens:
in your .gitignore after the lines "/includes/Smarty/templates_c/
/templates_c/" there
may be an exception, for example:
"!*.c", as a result, all files with the .c extension will not be be ignored.
This can be either in .gitignore, which lies in the root directory of the repository, or deeper, for example, here /includes/.gitignore or here /includes/Smarty/.gitignore
And yet, maybe the same problem as this person: Why not does template work in .gitignore?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question