Git version
Finished off the work largely completed in this pull request: #21680

- [y] closes #21295
- [y] tests added / passed
- [y] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [y] whatsnew entry