You can use SHA-256 in production. And you can convert SHA-1 repos into SHA-256 repos.
However:
- SHA-1 repos are not compatible with SHA-256 repos so you can't mix and match the trees (i.e. a SHA-256 fork couldn't upstream their commits to a SHA-1 repo).
- The conversion path from SHA-1 to SHA-256 will break all GPG signatures on the repo.
- There may be breaking changes to the SHA-256 repository implementation in the future however those changes will be guaranteed to come with an upgrade path for any users of the existing SHA-256 implementation.
So it's viable as an option but it's by no means "blessed" like the existing SHA-1 impl is.
SHA-1 really is broken, and therefore standard Git repositories do not offer integrity protection against someone who is determined to do harm and has some resources.
Edit: Since git 2.13, released about a month after SHAttered was published in 2017: https://github.com/git/git/blob/master/Documentation/RelNote...
Really disappointing and terrible for interop.
GitLab has been working on integrating SHA-256 support for a while. According to this comment[1], there's only one major blocker left (which seems to be completed at the time of this comment) before they can start testing SHA256 support on GitLab.org.
1. https://gitlab.com/groups/gitlab-org/-/epics/10981#note_1797...