Github respects editorconfig settings. Adding indent_size as 4 in settings makes github indent code to 4 columns.