Preface
When I created a new project a few days ago, I accidentally selected a git repository, which resulted in this test project being managed by git.
Solution
1 Right-click the project and select Open Resource Directory
2 Delete .git files
Delete the .git file in the directory
3 Delete git management in idea
After deleting the .git file, enter idea. There will be a prompt like this in the lower right corner. Click configure.
Or find the location in settings
4 Select the item, click delete, select apply, ok
Check the effect
After completing the above operations, check again and see that the project is no longer managed by git.