【发布时间】:2015-12-30 12:29:31
【问题描述】:
我正在尝试清理 git 存储库。有一些已识别的大文件的大小已减小并重新提交。问题是历史仍然有旧文件。所以我使用 bfg 清洁工作来修剪 git repo。为此,我首先创建了一个 repo 的镜像克隆,然后进行一些过滤以减小大小。
克隆命令:-
git clone --mirror ssh://git@url/repo.git
我成功地清理并减小了克隆镜像的大小。现在我尝试将其推送到远程服务器。我使用:-
git push
这失败并出现以下错误:-
Counting objects: 214329, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (80081/80081), done.
Writing objects: 100% (211535/211535), 666.00 MiB | 1.52 MiB/s, done.
Total 211535 (delta 116658), reused 206326 (delta 112960)
remote: You are attempting to update refs that are reserved for Stash's pull
request
remote: functionality. Stash manages these refs automatically, and they may
not be
remote: updated by users.
remote:
remote: Rejected refs:
remote: refs/pull-requests/190/from
remote: refs/pull-requests/247/from
remote: refs/pull-requests/247/merge
remote: refs/pull-requests/269/from
remote: refs/pull-requests/269/merge
remote: refs/pull-requests/270/from
To ssh://git@url/repo.git
! [remote rejected] integration -> integration (pre-receive hook declined)
! [remote rejected] integration_after_mavenrework -> integration_after_mavenrework (pre-receive hook declined)
! [remote rejected] master -> master (pre-receive hook declined)
我不知道为什么我不能推动。我对 repo 有写权限。
我被困住了,感谢任何帮助。
【问题讨论】:
-
消息相当清楚 - 你不能推送拉取请求引用,因为 Stash 管理它们。而且您在 Stash 上设置了一些挂钩,这些挂钩阻止您直接推送到 master 等。
-
你好奥利弗,我也怀疑过,但我找不到启用的钩子。你知道获取服务器和客户端活动钩子列表的命令吗?
-
奥利弗查尔斯沃思 - 不,这不是真的。正如我所说,没有设置挂钩。我找到了问题的答案。对于面临上述问题的人,请查看confluence.atlassian.com/display/STASHKB/…
标签: git github bitbucket-server bfg-repo-cleaner