[英]Untrack files from git in worktree
I have three machine, local -> Server A -> Server B 我有三台机器,本地->服务器A->服务器B
and programming on local, then use git push local code to Server A, 并在本地编程,然后使用git push本地代码到服务器A,
on Server AI set a hook to push the code to Server B, 在服务器AI上设置钩子以将代码推送到服务器B,
both on Server A and Server B have configure this 服务器A和服务器B上的服务器均已配置
$ git config core.worktree /home/www
$ git config core.bare false
$ git config receive.denycurrentbranch ignore
and have a hook git checkout -f
并有一个钩子
git checkout -f
how can I change some files on Server B and not track it? 如何更改服务器B上的某些文件而不进行跟踪?
I try git update-index --assume-unchanged path/to/file
我尝试
git update-index --assume-unchanged path/to/file
but alway notice fatal: Unable to write new index file
但始终会
fatal: Unable to write new index file
I'm sure user have permission in that folder(can write, read and execute) 我确定用户在该文件夹中具有权限(可以写入,读取和执行)
I also try git update-index --skip-worktree path/to/file
doesn't work 我也尝试
git update-index --skip-worktree path/to/file
不起作用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.