I am trying to cleanup huge git repo history using BFG cleaner tool.
For same i first create a mirror of git repo to be cleaned.
git clone --mirror git://example.com/some-big-repo.git
I run few commands to do the clean and later when I am finished I try to push my changes.
git push
This fails with below stack trace
Counting objects: 217307, done. Delta compression using up to 8 threads. Compressing objects: 100% (80946/80946), done. Writing objects: 100% (214361/214361), 666.42 MiB | 1.15 MiB/s, done. Total 214361 (delta 118358), reused 209184 (delta 114750) 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 To ssh://git@example.com/some-big-repo.git ! [remote rejected] CLI-PS-Command-Shows-Tag-And-Branch -> CLI-PS-Command-Shows-Tag-And-Branch (pre-receive hook declined) ! [remote rejected] IBIS-17123 -> IBIS-17123 (pre-receive hook declined) ! [remote rejected] IBIS-17763 -> IBIS-17763 (pre-receive hook declined) ! [remote rejected] IBIS-18435_Branch_7_1 -> IBIS-18435_Branch_7_1 (pre-receive hook declined) ! [remote rejected] IBIS-20151_Rename_non_existing_Object_ia_CLI -> IBIS-20151_Rename_non_existing_Object_ia_CLI (pre-receive hook declined) ! [remote rejected] IBIS-20261_variables_of_queued_processes_71 -> IBIS-20261_variables_of_queued_processes_71 (pre-receive hook declined) ! [remote rejected] IBIS-20589 -> IBIS-20589 (pre-receive hook declined) ! [remote rejected] IBIS-20590 -> IBIS-20590 (pre-receive hook declined) ! [remote rejected] IBIS-20650_head -> IBIS-20650_head (pre-receive hook declined) ... error: failed to push some refs to 'ssh://git@example.com/some-big-repo.git'
To fix above issue i tried to increase the stash hook buffer capacity as I thought that might be the failure reason.
Go to stash-config.properties hook.callback.buffer.capacity=15728640
But i still continue to get the push error.
Please advise.
The reason I was facing above issue is as I mirror clone the repository which also clones the pull requests.
remote: Rejected refs:
remote: refs/pull-requests/
190
/from
remote: refs/pull-requests/
247
/from
remote: refs/pull-requests/
247
/merge
To ssh:
//git@example.com/some-big-repo.git
I had to get rid of the pull request(by either getting them merged or declined) and then do the mirror clone again Everything worked fine this time.
You have to deal with (decline or merge) the open pull requests in your repository.
I have faced with same problem (given in detailed below) during mirroring a git repository on Bitbucket server to an another server.
$ git push -f NEW-REMOTE --mirror
Counting objects: 31760, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6841/6841), done.
Writing objects: 100% (31760/31760), 3.37 MiB | 0 bytes/s, done.
Total 31760 (delta 12540), reused 31760 (delta 12540)
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/2/from
Actually the error message is not clear or informative or directive very much but it shows that something related to refs is wrong or missing in your source repository. In my problem, there was open pull requests in the source repository which I was mirroring to another server. I declined the pull requests (you might merge it regarding the pull request details) and then mirroring operation is accomplished without any error.
In order to see whether there is an open pull requests in your source repository, you can look at this link below:
https://git-repository-url/pull-requests?state=OPEN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Time to up your Loom game! The new Loom Essentials Certification is here! Show off your skills, learn pro tips, and get officially recognized. Perfect for taking your video messaging to the next level.
Learn moreOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.