rtyley / bfg-repo-cleaner

Removes large or troublesome blobs like git-filter-branch does, but faster. And written in Scala
https://rtyley.github.io/bfg-repo-cleaner/
GNU General Public License v3.0
10.86k stars 535 forks source link

specify -u origin master in main docs #374

Open hyperknot opened 4 years ago

hyperknot commented 4 years ago

The main docs state that you finish by running git push. This is wrong, and will result in (deny updating a hidden ref) errors, which is the number #1 issue coming up with BFG repo cleaner in Google.

I've read through many threads basically saying that we need to ask GitHub support to remove cache and pull requests and whatsoever, which I almost did.

However, after spending 2 hours on this, I finally found this comment by @harrylincoln, which saved my day: https://github.com/rtyley/bfg-repo-cleaner/issues/41#issuecomment-480798126

We have to use

git push -u origin master

And then those (deny updating a hidden ref) errors won't happen with GitHub.

Please update the main docs, as everyone will run into that cryptic error message and find wrong solutions by Google. The solution is very simple, just specify -u origin master and GitHub is happy to take the push!

bremme commented 3 years ago

I'm not sure, when I use git push -u origin master I get: fatal: --mirror can't be combined with refspecs

yeslee-v commented 2 years ago

@bremme Check your commit log again, they are already removed!