Add .gitattributes file, treat .pbxproj as binary

Summary:
By default, the `.pbxproj` file generated by React Native should be treated as binary data to prevent Git from possibly automatically converting or fixing CRLF issues with this file, which would break it.

See https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#identifying-binary-files-znTLIVhvhG (where it specifically mentions `.pbxproj` files) for more information.
Closes https://github.com/facebook/react-native/pull/10864

Differential Revision: D4162492

fbshipit-source-id: 2c8f2f0ab2bb41c23b1460ef6cba672ef38f6310
This commit is contained in:
Dustin Ingram 2016-11-10 17:53:02 -08:00 committed by Facebook Github Bot
parent 454c33884a
commit 07dc35e4ad
2 changed files with 5 additions and 0 deletions

View File

@ -111,6 +111,10 @@ module.exports = yeoman.generators.NamedBase.extend({
this.templatePath('_gitignore'),
this.destinationPath('.gitignore')
);
this.fs.copy(
this.templatePath('_gitattributes'),
this.destinationPath('.gitattributes')
);
this.fs.copy(
this.templatePath('_watchmanconfig'),
this.destinationPath('.watchmanconfig')

View File

@ -0,0 +1 @@
*.pbxproj binary