Gian Paulo Zamora
Gian Paulo Zamora

Reputation: 83

Issue with VSCode vs Github code indentation

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.

Upvotes: 4

Views: 3028

Answers (1)

Mark
Mark

Reputation: 180659

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.

Upvotes: 6

Related Questions