Open RobinManoli opened 4 years ago
Non-bare repos are typically clones - working copies. A hosted/shared Git repo is typically bare.
Yes, it should be clearer that non-bare repos are not supported
This should be clearer. I attempted this with a personal project that only exists as a local repository so far and was somewhat confused. I suppose I'll just replace my original repo with a clone from the mirrored one.
How can I update the original non-bare repository with the new cleaned up version?
According to the documentation (https://rtyley.github.io/bfg-repo-cleaner/) the original repo to be cleaned up seems to be expected to be bare. (It should be written in the documentation that the guide will not work if the original is non-bare.)
Everything in the guide works until "git push".
Here is the error message on "git push": remote: Resolving deltas: 100% (371/371), done. remote: error: refusing to update checked out branch: refs/heads/master remote: error: By default, updating the current branch in a non-bare repository remote: is denied, because it will make the index and work tree inconsistent remote: with what you pushed, and will require 'git reset --hard' to match remote: the work tree to HEAD. remote: remote: You can set the 'receive.denyCurrentBranch' configuration variable remote: to 'ignore' or 'warn' in the remote repository to allow pushing into remote: its current branch; however, this is not recommended unless you remote: arranged to update its work tree to match what you pushed in some remote: other way. remote: remote: To squelch this message and still keep the default behaviour, set remote: 'receive.denyCurrentBranch' configuration variable to 'refuse'. To /home/mydir/my-original-repo ! [remote rejected] master -> master (branch is currently checked out) error: failed to push some refs to '/home/mydir/my-original-repo/'