Home > Software design >  Issue with VSCode vs Github code indentation
Issue with VSCode vs Github code indentation

Time:04-08

I am currently having an issue with the automatic indentation when pushing my code to Github.

I currently have my tab settings to be using spaces on VS Code (tabs set to 2 spaces), yet Github is displaying a massive jump in the organization of the code.

Below are examples of what I am experiencing:

My code looks on VS Code: enter image description here

My code in Github: enter image description here

Settings that I have manipulated (tabs to spaces setup on VS Code): enter image description here

At this point, I don't even know if my settings are set up properly.

CodePudding user response:

You need to set your preferred tab size in github as well.

Go to your Settings (under your icon in the upper right of any repository page),

Appearance/Tab size preferences <== set to 2.

So it is a guthub issue, I think github interprets a tab as 8 spaces by default for some reason.

  • Related