If those indentation issues are reflected back in your code after a git push to GitHub, you either have:
Those are the two automatic mechanisms that could explain a change during the
But if your code looks fine locally after the git push, but looks not fine on GitHub, then you must have a combination of space and tabs correctly rendered locally, and rendered differently on GitHub.
As mentioned in “Indentation issue using sublime text 2“:
The problem is not hard tabs, the problem is mixing spaces and tabs for indentation.
Read more here: Source link