2

So I recently created a GitHub account. Among other things a problem that I seem to have it tabs. When you are creating a new folder in repository, Github hasthe following options:

  • Indent Mode
    • Spaces
    • Tabs
  • Indent Size
    • 2
    • 4
    • 8
  • Line Wrap mode
    • No wrap
    • Soft wrap

The problem I seem to be having is that when I set the following values:

  • indent mode to tabs
  • indent size to 4

When I save that file it is automatically set to tabs and 8

What is going on here?

Why is indent size getting set to 8 even when I specifically set it to 4?

KyleMit
  • 35,223
  • 60
  • 418
  • 600
Muhammad Salman
  • 413
  • 5
  • 17

1 Answers1

4

The default tab size in GitHub is set to 8.

You can achieve indentation by using selecting indent mode as spaces and setting it to 4 or whatever you want.

To check the file on GitHub with different indentation you can append ?ts=2 or ?ts=4 to the URL to change the tab-size.

Harshal Y.
  • 4,475
  • 1
  • 16
  • 40