remove git from a local folder code example Example 1: git remove repository local $ rm -rf .git Example 2: how to remove git directory in terminal rm -rf .git