git - What is the correct file permissions for .gitignore -


i'm work on new project , .gitignore file accessible web bit of security leak.

the .gitignore files permissions 644 i.e. -rw-r--r--. project on bitbucket.org, perhaps requires file accessible web?

i set .git once before project below permisions

drwxr-xr-x  8 www-data www-data   4096 jan 13 09:58 .git -r--------  1 www-data www-data    622 dec 17 10:52 .gitignore 

so i'm wondering correct permission should on these? in research i've come across info on setting git config's filemode & permissions on hooks.

so i'm wondering correct permission should on these

since file configuration file tell git ignore files locally on repository, can set permissions to.

.gitignore published in source code if wish "ignore" files in repo without adding them .gitignore if afraid publish data on web, can use flag:

you can try , use assume-unchanged flag
https://git-scm.com/docs/git-update-index

--[no-]assume-unchanged

when flag specified, object names recorded paths not updated.

instead, option sets/unsets "assume unchanged" bit paths.

when "assume unchanged" bit on, user promises not change file , allows git assume working tree file matches recorded in index.

if want change working tree file, need unset bit tell git. helpful when working big project on filesystem has slow lstat(2) system call (e.g. cifs).

git fail (gracefully) in case needs modify file in index e.g. when merging in commit; thus, in case assumed-untracked file changed upstream, need handle situation manually.

enter image description here


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -