Re: "groups of files" in Git?
From: Nikolay Shustov <hidden>
Date: 2017-07-11 18:30:49
Thank you for #3. As for 1+2, the documentation says: "Each line in gitattributes file is of form: pattern attr1 attr2 ... ... When the pattern matches the path in question, the attributes listed on the line are given to the path." My understanding is that to have the bunch of the files in the separate directories having the same attribute, I would have to, for each file, create a separate gitattributes line with the exact paths/filename and needed attribute. Is it would you are suggesting or I misunderstood the idea? On Tue, Jul 11, 2017 at 2:19 PM, Stefan Beller [off-list ref] wrote:
On Tue, Jul 11, 2017 at 11:10 AM, Nikolay Shustov [off-list ref] wrote:quoted
Thank you for the explanation. The example about backend and frontend is relevant even though I normally have to deal with more layers at the same time. However, in my case I have the thing that you have already tried to address, partially: the changes always align with file boundaries BUT not with directory boundaries. Imagine you have the stack of backend, data transport and frontend layers. The feature has to touch all three layers thus resulting in the changes in the apparently different directories. Thus, making the distinction by the pathspec (if I understood it right from reading the documentation) would not help. The attributes could be a solution, if I could: 1. create attribute designated to the feature 2. "mark" uncommitted files in different directory with that attribute1+2 should be answered by the gitattributes man page https://git-scm.com/docs/gitattributesquoted
3. filter the list of unchanged files with such attributeThis sounds like one of "git status :(attr:backend) ." "git status :(exclude,attr:backend) ."quoted
4. create commit for the files only with the certain attribute You've kindly demonstrated that #4 is doable; however I could not clearly get for the Git documentation if #1 - #3 are achievable... Could you point me to the right place in the documentation, please?