upgrade-support icon indicating copy to clipboard operation
upgrade-support copied to clipboard

Dirty git repo after upgrading to 0.62.0

Open stigi opened this issue 5 years ago • 4 comments

Environment

Happens on macOS (Catalina 10.15.4 (19E287)). Didn't confirm on other versions or OSes.

Upgrading version

From 0.61.5 to 0.62.0

Problem

.gitattributes changes will cause the git repo to check out as dirty on a fresh checkout. More details here https://github.com/react-native-community/rn-diff-purge/issues/35

Solution

Ignore the .gitattributes changes, as they are also not part of a vanilla 0.62.0 project.

stigi avatar May 13 '20 08:05 stigi

@pvinis: can you check this out?

lucasbento avatar May 13 '20 09:05 lucasbento

Thanks for the report. I'll take a look today. I think I know what the problem is, but I'll confirm and come back.

pvinis avatar May 13 '20 10:05 pvinis

We are also experiencing this issue after using https://react-native-community.github.io/upgrade-helper/ Sorry to ask @pvinis but did you have an outcome as to whether it is needed or not?

benjaminpearson avatar Oct 09 '20 06:10 benjaminpearson

Right, it's been a while. Here is the thing:

.gitattributes added a rule for *.bat files to end lines with crlf. In the android folder there is a gradlew file, which is a script that can be ran in macos, and a gradlew.bat file, which is a script that can be ran in windows. Windows needs that file to have line endings crlf to work properly. Macos often likes to change these line endings to just lf.

So:

  • If you use macos for developement and never use windows, you can ignore the changes, you can even remove the rule from gitattributes if you like.
  • If you use macos and windows for development, then it's better to keep that rule, and find a way for your system or your editor to not mess with line endings in files.

I hope that makes sense and helps a bit. If not, we can look into it a bit more.

pvinis avatar Oct 09 '20 07:10 pvinis