0

What is wrong with my default settings on Linux?

rm -rf PATH
mkdir -p PATH
cd PATH

git clone GITPATH .
git status

It shows all of the recently downloaded files as modified. And I cannot pull later on.

# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)

#       modified:   readme.txt
#       modified:   todo.txt

Diff

git diff todo.txt

diff --git a/todo.txt b/todo.txt
old mode 100644
new mode 100755

How can I get rid of this unexpected annoying thing?

Andrew Aylett
  • 37,919
  • 5
  • 65
  • 94
Bimal Poudel
  • 1,182
  • 2
  • 15
  • 39
  • That's definitely weird. Could you add some more details about your environment (e.g. Linux distribution, any significant configuration you may have done, etc.)? – Chris Jan 09 '15 at 15:07
  • It is a default whm/cpanel installation upgraded manually later on through web interface. – Bimal Poudel Jan 09 '15 at 16:42

1 Answers1

0

you could use a filesystem that supports file permissions. also reading How do I make Git ignore file mode (chmod) changes? might help. btw this is certainly not the default for a proper linux installation.

git config core.fileMode false
Community
  • 1
  • 1
mnagel
  • 6,189
  • 4
  • 28
  • 63