• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Git and UTF-16 .strings files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Git and UTF-16 .strings files


  • Subject: Git and UTF-16 .strings files
  • From: David Avendasora <email@hidden>
  • Date: Mon, 07 Oct 2013 12:54:57 -0400

Hey all,

I just ran into this in one of my projects and thought I would post the fix as I'm sure I'm not the only one to have run into this.

Git thinks that UTF-16 encoded text files are binary and won't automatically merge non-conflicting changes, which makes working on a D2W / localized project a real pain.

The fix is simple:

Create a .gitattributes file in the root of your project (probably right next to .gitignore - yes, alphabetically)   with the following two lines:

[attr]utf16 diff merge -crlf
*.strings utf16

Git will now automatically merge non-conflicting changes without any complaints!

You can also add those settings to your global git settings, but by putting it in the root of your project, anyone else that works on the project will immediately get the benefits too.

Hope this helps someone besides future me. I'm sure I'll be googling this issue again in 6 months.

(Hi future Dave! You are looking mighty handsome, I must say.)

Dave


—————————————————————————————
WebObjects - so easy that even Dave Avendasora can do it!™
—————————————————————————————
David Avendasora
Senior Software Abuser
Nekesto, Inc.





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Git and UTF-16 .strings files
      • From: Fabian Peters <email@hidden>
  • Prev by Date: Re: Using UNION in EOFetchSpecification
  • Next by Date: Re: Git and UTF-16 .strings files
  • Previous by thread: Re: LongResponsePage does not return from cancelPage method
  • Next by thread: Re: Git and UTF-16 .strings files
  • Index(es):
    • Date
    • Thread