Home > OS >  Github Code displaying wrong indentation issue
Github Code displaying wrong indentation issue

Time:11-10

I realized that when I push my code to my GitHub repo, the indentation is being displayed as 8..? but In my VSCODE, I have set my indentation as 2.

Is there a permanent fix to this issue? I am aware that I can go into my code and press the pen icon and view my code in 2 spaces, 4 spaces or 8 spaces using the options but this doesn't change my code being displayed in 2 spaces permanently.

Below is the image comparison

Github displaying wrong indentation

Indentation in my vscode

CodePudding user response:

Double-check first your GitHub account settings "Tab Size Preference" (https://img.codepudding.com/202111/81f6ac5daf00426b90a926e3f6c468d5.png

Those should apply to all of your repositories.

  • Related