Answer the question
In order to leave comments, you need to log in
How can I set up git to only add to tracked files when branches are merged?
The title of the question is vague, so I'll decipher it here. I am developing a project in which there are 2 main files, and 5 auxiliary ones. Service stores information about all sorts of things that are not interesting to me, but they are needed to build the project. I am now forced to store service files under the control of git - changes in them are not interesting to me, but without them the project cannot be built. And they change (but not by me, but automatically) constantly. Git faithfully monitors them and stores them in history. But these service files really interfere with me - they clog diff, they eat up the file space on the server and because of them slow down the web interface (and clutter up the output).
The question is how can I not track them when working locally, but only send them to git when pushing to the server?
Answer the question
In order to leave comments, you need to log in
Something is wrong here. Service files, without which the project cannot be built, should not change constantly and automatically. If they change automatically, then what prevents them from being automatically changed when building the project?
There are usually 2 types of side files: 1) those that are really needed to build the project, but they are changed deliberately manually or by special commands, and these files are stored in the version control system; 2) all sorts of build artifacts, local settings and development environment files - they are either not needed at all, or can be recreated without problems, and these files are not added to the version control system at all.
You have some mixture. Can you tell me what kind of files?
Oh sure. Under git, I have the development of external processing on 1C.
To place texts under git, a utility that parses the file is launched. Each time the file is changed (and in development you constantly press the save button and watch the changes in 1C), the version number changes and some other nonsense. You open it under gitlab and there, in addition to the text of the module and the form, it shows a bunch of all sorts of files
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question