how to delete local repo code example Example 1: git remove repository local $ rm -rf .git Example 2: clone and remove existing git repository git rm -rf git