In which case, as per my latter comment (I didn't see your reply when I made it, sorry), I think your editor is changing between tabs and spaces as github shows 1 tab that is equal to 4 spaces differently to 4 normal spaces.