I did git init and git add . on my home directory, which slowed every operation down, I think, because the directory is so large. How can I undo
git init
git add .
You can just do rm -rf $HOME/.git to remove all the version control information stored by git, which undoes whatever git init did.
rm -rf $HOME/.git
But I highly doubt that running git init could slow anything down.