D
D
Demigodd2018-04-13 08:04:08
GitHub
Demigodd, 2018-04-13 08:04:08

How to change the tab size when adding files to github?

When adding code to Github. It automatically replaces the tabs with 8.
If you click edit and select a size of 4, then the code will look like in the IDE.
5ad039cf927a4986353264.png
In general, is there a way to solve this problem, namely when sending the code, not on the github site?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2018-04-13
@Demigodd

The size of the tubulation is configured in your editor.

P
Pavlo Ponomarenko, 2018-04-14
@TheShock

I'm not sure if I understood you correctly, but you may be interested in the ".editorconfig" file, setting:

indent_style = tab
indent_size = 4

More details: editorconfig.org
Commit the file to the root of the project, and the github picks it up.
Like here: https://github.com/VirgilSecurity/virgil-sdk-javascript
An example of a file with a tab 4 spaces wide:
https://github.com/VirgilSecurity/virgil-sdk-javas...
This is exactly the tabs and exactly 4 spaces wide

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question