2

I work with a project who's convention is to use 4 spaces instead of tabs. With git GUIs such as SourceTree that use the git CLI under the hood, I was able to previously develop locally using tabs, and push those tabs as spaces. This was done using the first answer in this question: Can git automatically switch between spaces and tabs?

I tried setting this up with GitKraken with no success. I'm guessing that is because GitKraken doesn't use the git CLI under the hood. Is there a way to accomplish this with GitKraken?

Justin
  • 447
  • 4
  • 10
  • 33

1 Answers1

1

That would not be possible with GitKraken directly, as reported here and in this thread

GitKraken not using .gitattributes filters

I've done a little bit of research and I'm guessing this is because GitKraken is running on it's own internal Git and not the OS git cli and is not checking in with my local .gitattributes file.

You would need to switch to command line, just for the git commit part.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Since the repo uses spaces, file has spaces on my machine, since are not converted to tabs. I think something would be required for this as well as the git commit? – Justin Sep 24 '19 at 16:43
  • 1
    @Justin Yes, the checkout should be done by command-line as well, for the .gitattributes to be enforced, and the smudge script declared in it to convert spaces to tabs (as shown in the post you are referring in your question). Again, GitKraken alone seems to ignore `.gitattributes`. – VonC Sep 24 '19 at 20:22