从工作树中的git解压缩文件

时间:2013-08-20 00:41:51

标签: git repository

我有三台机器,本地 - >服务器A - >服务器B
并在本地编程,然后使用git push本地代码到服务器A,
在服务器A上我设置了一个钩子将代码推送到服务器B,
服务器A和服务器B都配置了此

$ git config core.worktree /home/www
$ git config core.bare false
$ git config receive.denycurrentbranch ignore

并有一个钩子git checkout -f

如何更改服务器B上的某些文件而不跟踪它?

我尝试git update-index --assume-unchanged path/to/file
但总是注意fatal: Unable to write new index file

我确信用户在该文件夹中有权限(可以写,读和执行)
我也尝试git update-index --skip-worktree path/to/file不起作用

1 个答案:

答案 0 :(得分:0)

您的存储库中应该有一个.gitignore文件。您可以将不应跟踪的文件包含在.gitignore中,请阅读更多here