I often work in the docker bash & do all my git add -p stuff in there but then back out to commit because my git config is not done in there & it doesn't feel work doing since docker is temporary - it would be nice if it picked up my config like we do for xdebug
I generally ignore .idea (I kinda like the idea of experimenting with a shared idea config but probably not in the main repo) & also configure my name & email
git config --global core.excludesfile ~/.gitignore