Closed aarnaut closed 4 years ago
You need to find a way to either override that fire Bitbucket, or delete the PRs and their refs, or push your cleaned repo to a fresh project, discarding the PRs.
I decided to do a push all refs except for PR, like this git push --force refs/head/*
and git push --force refs/tags/*
. This turned out fine.
Someone please correct me if I'm wrong, but I believe the solution by @aarnaut just hides the problem.
Question: Will (or could) these pull-requests eventually be removed by Github?
I experimented with a small test repo I added a file, "ngfile.txt", removed it and ran BFG to remove it from the history. I can still see the contents of the file when I look at the PR. But the PR info also telling me: "This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository." See PR info
Does this mean that the commit for the PR may eventually be removed during clean up?
Hey,
I know a similar question has already been asked, but none of the solutions seem to work for me. I have a repository hosted on an internal company Bitbucket server and I'm trying to clean up some old binaries that take up a lot of space. I'm trying to do the following:
git push fails with the following message:
I've tried a couple of solutions, for example:
git clone --mirror repo.git
, rungit show-ref | cut -d ' ' -f2 | grep 'pull-request' | xargs -r -L1 git update-ref -d
and thengit push
after that. It fails with the same error.git clone --mirror repo.git
, I dogit config -e
, update the fetch config and finish off withgit remote update
andgit push
. This doesn't seem to do anything. I just end up getting the same error after running bfg. I'm not sure if this is expected, but myrefs
folder doesn't contain apull-requests
folder until I run bfg.