2

I'm trying to push changes I made to a file's attributes (read/write permissions, etc.) and git isn't letting me because the actual contents of the file have not changed. Running git rm and git add on the file did not help, it just says that there's nothing to commit.

Is there a way I can force git to assume a file is changed, or to commit it anyway? I'd rather not make a trivial edit to the file because then the purpose of the commit will seem misleading, even with a message saying so.

I've searched around for other people having this issue and honestly I didn't find any. I don't have a .gitignore, there are no assume-unchanged bits set, etc.

slondr
  • 201
  • 3
  • 10
  • @destoryer I saw that question, my filemode was already set to true. Git still says that there's nothing to commit. – slondr Jul 22 '18 at 18:56
  • I don't think Git records read/write permissions, only execute permissions. – jwodder Jul 22 '18 at 18:59
  • Citing from the linked question: "git really only tracks whether a file is executable or not, not the full set of *nix permissions. So you would have to switch a file between executable/not for it to think you have changed something worth committing". – pishpish Jul 22 '18 at 18:59
  • See also: https://stackoverflow.com/questions/39666585/does-git-store-the-read-write-execute-permissions-for-files – jwodder Jul 22 '18 at 19:04

0 Answers0