I have to believe that most of that is data. (Otherwise, that is one big codebase and a lot of revision history.) Consider creating a fresh project, copying everything over other than .git, and putting the large data objects in .gitignore. It feels like the slowness is from all the diffing.
yes, git should only track code, its not appropriate (in a standard way) for data and especially large data. though there are extensions like Git Large File Storage (git-lfs.com)
I looked further into when this happens and seems like it's not the data files (they are already in .gitingnore).
This only happens after I use some function I made with lapply.
Anyway, thank you for the help.
I will close this post.