2

I am storing all the generated files in the build folder and trying to ignore these files in the pull request, I found and used the following method for doing so:

1.Create a .gitattributes file in the root directory.

2.Add this code to it:

build/**/* linguist-generated=true
/build/**/* linguist-generated=true
/build/**/*.html linguist-generated=true
build/*.html linguist-generated=true
build/ linguist-generated=true
/build/ linguist-generated=true
build/name.html linguist-generated=true
/build/name.html linguist-generated=true

I know all these lines might not be necessary but this is everything I have already tried to see if it works, but the files in the build folder still show up in PR changed files tab, What am I doing wrong here?

torek
  • 448,244
  • 59
  • 642
  • 775
Odasaku
  • 177
  • 6
  • 17
  • Could you share the link to the repository? – pchaigno Jul 27 '21 at 12:16
  • I am really sorry but it is a private repository. – Odasaku Jul 27 '21 at 14:46
  • Note that linguist-generated flagging is a *GitHub* feature, not part of basic Git. The [tag:git] tag isn't really appropriate, in other words. (The flag doesn't harm basic Git at all, it's just completely ignored.) – torek Jul 27 '21 at 22:55

1 Answers1

7

What I realized is that I was mistaken in thinking that the files won't show up at all, instead, these files show up in the changed files, but just that the changes in them are not loaded by default and we can click on load diff, if we want, like the way a normal file shows up if it has big changes in it.

Odasaku
  • 177
  • 6
  • 17