How to fix «detected dubious ownership» for Git after reinstalling Windows?

2023-05-29--23-08-22

takeown /f "<path>" /r /d y

stackoverflow.com/a/74754781