1

I made local changes to my repo. Github Desktop showed over 600 files changed.

I then committed to my branch. The commit showed up on Github.com with no issues, however, only 290 files are shown as changed.

The bulk of my changes were from updating an admin theme, which involved copy/replacing a number of files from an external folder into my local repo.

It's likely that a large number of these files weren't actually different, but Github Desktop registered them as changes anyway. Perhaps when I committed, Github compared and determined that only 290 of the 600+ files "changed" were actually different?

Should I be concerned about the discrepancy, or is the theory explained above the likely cause?

Nathan
  • 143
  • 7
  • Did you manually synced your github project? – WQYeo Jan 24 '17 at 04:33
  • My local repo was already synced and updated from master before I began making any changes. So after the changes, I simply clicked "Commit to {my branch}". – Nathan Jan 24 '17 at 04:35
  • Have you checked carefully? Github hides the diff if the files are very big or binary? I also have missed these diffs in the past – Mangat Rai Modi Jan 24 '17 at 04:37
  • A lot of the files were binary, and Github isn't showing diff on those. But I didn't think this would affect the # of changed files... – Nathan Jan 24 '17 at 04:40
  • Ouch numbers still should be same... – Mangat Rai Modi Jan 24 '17 at 04:42
  • 1
    `It's likely that a large number of these files weren't actually different` ... no, I doubt that. If they showed up in the change set, they were different. One possibility is that you have a line endings issue here, and the other 310 files were rendered identical after altering line endings. – Tim Biegeleisen Jan 24 '17 at 04:46
  • Good idea. I'm on Windows, so certainly a possibility. Altogether, I copy/replaced > 900 files to my local repo during the theme update, I'd still be surprised if most of them were _actually_ different than in the previous theme version. If your theory is correct, then nothing was really lost? If the files had been different in any other way, I assume they would have been included in the commit. – Nathan Jan 24 '17 at 04:57

1 Answers1

2

Open a shell from GitHub desktop and check your git config -l core.autocrlf:
if it is true, it is possible Git has changed the eol (end-of-lines) characters to Windows ones (\r\n) automatically.
See "Is there a way to determine the line endings in a existing git repo?"

That would explain the large number of local changes.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • core.autocrlf = true So these files weren't actually different (aside from CR LF vs. LF)? – Nathan Jan 24 '17 at 05:11
  • @fournines yes: you can detect it with `git -c color.diff.whitespace="red reverse" diff -R -- afile` as my first link mentions – VonC Jan 24 '17 at 05:18