1

I create a project in Java in the Spring framework, where I also have many HTML pages (39.4%).

languages bar

Java 45.3%   
HTML 39.4%   
JavaScript 11.2%     
CSS 4.1%

The point is that this is a Java project and I'll be doing code refactoring and probably the percentage of Java will be lower than the percentage of HTML. I am afraid that then the project language will be changed to HTML at this point:

main language in repository list

If there is more HTML code, will the project language change from Java to HTML?

If so, what do you need to do to set Java?

juzraai
  • 5,693
  • 8
  • 33
  • 47

1 Answers1

1

You can override Linguist's default behaviour using .gitattributes. It is possible to

  • change the detected language of a file, e.g. telling GitHub that your HTML files should be classified as Java (this probably isn't appropriate), or
  • classify your HTML as documentation, generated files, or vendor data; each of these classifications should prevent your HTML from being considered in GitHub's language statistics.

Without knowing more about what those files represent I can't make a more concrete recommendation.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257