Skip to content

Instantly share code, notes, and snippets.

@joncardasis
Last active April 24, 2017 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joncardasis/ec5002d890ffb6ccc713fbfc69457da2 to your computer and use it in GitHub Desktop.
Save joncardasis/ec5002d890ffb6ccc713fbfc69457da2 to your computer and use it in GitHub Desktop.
Fix GitHub Displaying Incorrect Languages in Repo

Fix Linguistics in Your Repo

Sometimes GitHub will mismark your repo's languages.

I had a C++ project displaying that a large portion was Objective-C because of a single header file from SQLite3.h.

Step 1:

Create a .gitattributes file in your root. Mine looks like this:

# SQLite3
src/sqlite3.* linguist-vendored

This will ignore all sqlite3 files from GitHub's linguistic finder.

Step 2:

In order for the change to appear in GitHub you'll need to do this to enable the feature:

git config cola.fileattributes true

Enjoy 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment