Keep the ignored files during the upgrade process
Keep the ignored files during the upgrade process

Summary:
This PR fixes the issue #12237 relative to react-native-git-upgrade.

When the user adds new files to the .gitignore file, those files are deleted during the upgrade process because it starts by creating a fresh .gitignore file without user's modification, so the user's ignored files are no longer ignored and they are deleted during the upgrading process.

The best solution I've found to keep the user's ignored files... ignored, consists in appending the content of the .gitignore file in the `<TEMP DIR>/.git-rn/info/exclude` file.
The user's ignored files are now ignored at the repository level, they no longer interfere with the upgrade process.

Reminder: The tool uses a temporary local Git repository generated on the fly, so we can do whatever we want in it.

- Publish react-native-git-upgrade to sinopia
- `npm install -g react-native-git-upgrade`
- Init a new project with an old version: `react-native init MyApp --version=0.50.0`
- Create a new file named `dummy-ignored-file.json` in the project's root
- Append `dummy-ignored-file.json` to the `.gitignore` file
- Run `react-native-git-upgrade`

👉 The `dummy-ignored-file.json` is not deleted.

[CLI][BUGFIX][react-native-git-upgrade] - Keep the user's ignored files while upgrading
<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/17393

Differential Revision: D6839856

Pulled By: hramos

fbshipit-source-id: e4e9d759b59790e3cbc52408cef8314bf0a9c772

javache/react-native,pandiaraj44/react-native,exponentjs/react-native,janicduplessis/react-native,hammerandchisel/react-native,hoastoolshop/react-native,facebook/react-native,hammerandchisel/react-native,exponentjs/react-native,pandiaraj44/react-native,exponent/react-native,exponentjs/react-native,hoangpham95/react-native,javache/react-native,hoastoolshop/react-native,hoastoolshop/react-native,facebook/react-native,facebook/react-native,janicduplessis/react-native,arthuralee/react-native,hoastoolshop/react-native,exponentjs/react-native,arthuralee/react-native,exponent/react-native,arthuralee/react-native,janicduplessis/react-native,exponent/react-native,hammerandchisel/react-native,myntra/react-native,javache/react-native,hoangpham95/react-native,pandiaraj44/react-native,pandiaraj44/react-native,janicduplessis/react-native,hoangpham95/react-native,facebook/react-native,arthuralee/react-native,myntra/react-native,javache/react-native,pandiaraj44/react-native,arthuralee/react-native,javache/react-native,myntra/react-native,hoastoolshop/react-native,exponent/react-native,pandiaraj44/react-native,javache/react-native,myntra/react-native,hammerandchisel/react-native,pandiaraj44/react-native,myntra/react-native,facebook/react-native,exponent/react-native,javache/react-native,janicduplessis/react-native,facebook/react-native,myntra/react-native,myntra/react-native,hoangpham95/react-native,hoastoolshop/react-native,hoastoolshop/react-native,exponent/react-native,hammerandchisel/react-native,exponentjs/react-native,hoastoolshop/react-native,javache/react-native,javache/react-native,pandiaraj44/react-native,hoangpham95/react-native,hammerandchisel/react-native,exponentjs/react-native,hoangpham95/react-native,exponent/react-native,myntra/react-native,facebook/react-native,hammerandchisel/react-native,myntra/react-native,exponentjs/react-native,hoangpham95/react-native,janicduplessis/react-native,janicduplessis/react-native,hammerandchisel/react-native,exponentjs/react-native,hoangpham95/react-native,facebook/react-native,janicduplessis/react-native,facebook/react-native,exponent/react-native