git refs

Administration

Low-level access to the reference storage


The 'git refs' command manages how references are stored. git refs migrate converts a repository between the classic files backend and the newer reftable format, and git refs verify checks the reference database for problems. Everyday branch and tag work does not need it.

Synopsis

git refs migrate --ref-format=<format> [--dry-run]
git refs verify [--strict] [--verbose]
[ ] optional| or<arg> placeholder... repeatable--flag option

Examples

Check references

git refs verify

Silent when everything is fine.


Switch to reftable

git refs migrate --ref-format=reftable

Faster with many refs.

Workflow Examples

1
git refs migrate --ref-format=reftable --dry-run

Test first

2
git refs migrate --ref-format=reftable

Convert

Troubleshooting

unknown subcommand

Cause: Your Git is older than 2.46

Update Git

Tips & Pitfalls

Best Practices

  • ✓Back up before migrating a production repository.

FAQ

A:

Only for repositories with a very large number of branches or tags.