Google Xamarin.Forms: How To Change GitHub Repository Language For C# Projects | SubramanyamRaju Xamarin & Windows App Dev Tutorials

Monday 1 April 2019

Xamarin.Forms: How To Change GitHub Repository Language For C# Projects

Introduction:
We all know that Xamarin.Forms programming language is "C#". But I was struggling to get my GitHub repository to show my Xamarin.Forms project as “C#” and not as Java/other language. If you have this same problem, this article can teach you about "how to manually change GitHub repository language for xamarin.forms project to Csharp Language".
Description:
GitHub uses the open source Linguist library to determine file languages for syntax highlighting and repository statistics. Language statistics will update after you push changes to your default branch (which is usually master).

Some files are hard to identify, and sometimes projects contain more library and vendor files than their primary code.

Your Xamarin.Forms project source code may have this complexity, Github to identify primary language as Csharp. So we have to change it manually with below few steps.

Step 1: Open your Github repository

Step 2: Add a new file named .gitattributes at the root level, to your master branch in your repository.
Add the below lines to the file:

  • *.csharp linguist-detectable=true  
  • *.java linguist-detectable=false  
  • *.js linguist-detectable=false  
  • *.html linguist-detectable=false  
  • *.xml linguist-detectable=false    

  • Step 3: Save and Refresh
    Save and refresh your browser. You will be able to see your Xamarin.Forms project marked correctly with C# like below. Also you can add more types of files to be ignored.
    Please refer my Xamarin.Forms Github repository from here.

    You can also see overview of this article from below youtube video. Also for more videos please don't forget to SUBSCRIBE our youtube channel from 
    here.
    FeedBack Note: Please share your thoughts, what you think about this post, Is this post really helpful for you? I always welcome if you drop comments on this post and it would be impressive.

    Follow me always at @Subramanyam_B

    No comments:

    Post a Comment

    Search Engine Submission - AddMe