Is there a command to undo git init? September 6, 2022 by Tarik You can just delete .git. Typically: rm -rf .git Then, recreate as the right user.