git gc shows:
warning: reflog of 'refs/remotes/origin/abc_branch' references pruned commits
But, when I try to see the reflog, I get nothing:
$ git reflog show origin/abc_branch@{0}
fatal: ambiguous argument 'origin/abc_branch@{0}': unknown revision or path not in the working tree.
I know the syntax is right, because that happened to another branch and I was able to see the reflog - and remove it.
The abc_branch has been deleted on the remote without being merged - commits deleted. I don't want to recover it, I just want to get rid of the warning.
git reflog directories can be found at . git/logs/refs/heads/. , . git/logs/HEAD , and also . git/logs/refs/stash if the git stash has been used on the repo.
The "show" subcommand (which is also the default, in the absence of any subcommands) shows the log of the reference provided in the command-line (or HEAD , by default). The reflog covers all recent actions, and in addition the HEAD reflog records branch switching.
To delete single entries from the reflog, use the subcommand "delete" and specify the exact entry (e.g. "git reflog delete master@{2}").
Answer is no. Anonymous objects--objects that are only referenced by your reflog--are private to the local repo.
If you just want to get rid of the abc_branch
ref, you could try:
git update-ref -d refs/remotes/origin/abc_branch
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With