how to undo git init command code example Example 1: how to undo init git rm -rf .git Example 2: git init at wrong folder cd myFolder rm -rf .git