1

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

1 Answers1

1

Double-check first your GitHub account settings "Tab Size Preference" (new since Sept. 2021)

https://i.stack.imgur.com/Y4n7n.png

Those should apply to all of your repositories.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250