Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I know this isn't a huge deal, but I like my GitHub to be linguistically diversified. I wrote a project in Swift and when I commit it says it's in Objective-C.

I think it might be because the Parse frameworks are written in Objective-C and it detects that, but is there a way to change the display language on the main repository page?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
553 views
Welcome To Ask or Share your Answers For Others

1 Answer

I found the simplest thing was to create a file called .gitattributes in the root folder of my repository, and give it these contents:

* linguist-vendored
*.js linguist-vendored=false

This example tells GitHub/Linguist to ignore all files, and then just look at .js files. My project, https://github.com/aim12340/jQuery-Before-Ready, was listed as HTML because the HTML example files were bigger than the JavaScript files. This file fixes it for me and now it's listed as JavaScript.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...