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