Git set create mode to 100664 when pushing new folder/files to shared repo

后端 未结 2 1987
无人共我
无人共我 2020-12-17 04:06

Me and my colleagues have a shared Website repo. We are all on Windows 7 64 bit pushing to Ubuntu 10.04. Below is our setup in case this is in question.

local->hub-

2条回答
  •  温柔的废话
    2020-12-17 04:36

    It's caused by your filemode=false

    refer to http://www.gelato.unsw.edu.au/archives/git/0609/28190.html

    Ignore executable bit when adding files if filemode=0.

    If the user has configured core.filemode=0 then we shouldn't set the execute bit in the index when adding a new file as the user has indicated that the local filesystem can't be trusted.

    This means that when adding files that should be marked executable in a repository with core.filemode=0 the user must perform a 'git update-index --chmod=+x' on the file before committing the addition.

    Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano

提交回复
热议问题