Mercurial temporarily ignores file versions

My question is essentially the same as herebut refers to mercury. I have a set of files under version control, and one save operation modifies quite a lot of files. Some of the resulting changes are important for version control, and some of them are simply undesirable. I can "split" the garbage into separate files. These junk files must be part of the basic scan for it to work, but their contents (and changes over time) are not so important for version control. Now I'm just telling all our developers not to commit these files, but we all forget and create a lot of extra baggage in the repository. I don’t really like the proposed svn solution, because there are quite a few files, and I want a simple clone to work without this extra manual work, so I was wonderingDoes mercurial have a better alternative. This is similar to hg shelve, but not quite, and kind of ignored, but not really. Is there an hg extension that allows this? Can git do this?

+3
source share
3 answers

Mercurial does not support this. The right way to do this is to transfer thefile.sampleand then your developers (or better to deploy the script) make a copy from thefile.sampleto thefileif it thefiledoes not exist. Thus, anyone can update the example file, but there is no risk of their local changes (say, their personal database connection string).

+3
source

! , TortoiseHG , , , . , , , . hgrc, [tortoisehg], . , .

+2

( git), "" ( ), ( ).

https://www.mercurial-scm.org/wiki/Subrepository?action=show&redirect=subrepos

In git, submodules are one solution to this problem - but they are not as large as the user interface. Instead, I have to store two completely independent repositories and use the subtree merge strategy when I need to update the main repo with an unwanted repo: http://progit.org/book/ch6-7.html

+1
source

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


All Articles