Moved to new computer: git not working

Thanks both. Sorry for the delay. Bizarrely, I have had to change OS (from Mint to Ubuntu) but the location of these files is unchanged. I'll come back to the github gold option (!) as I'd like to keep that in reserve. However, the simple answer about the hidden files and folders is that they're all there. .git is there with its own folders and the restore was definitely restoring such files and folders. I wonder if the issue is in Rstudio not git. Hm, that got me to something I should have done already: use simple git from the command line Christopher! OK.
git config --list told me I didn't have my name and Email address presumably because I hadn't restored /home/chris because I thought too much there would be localised to the old machine. Easily fixed. Go to one of the folders with a project and .git, git status gave me this:

root@Clevo1:/media/chris/Clevo_SSD2/Data/MyR/R/distill_blog/test2# git status
fatal: unsafe repository ('/media/chris/Clevo_SSD2/Data/MyR/R/distill_blog/test2' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory /media/chris/Clevo_SSD2/Data/MyR/R/distill_blog/test2

So I obeyed that and now it shows me that all the files have been modified which is presumably because I knitted the whole directory again. However, back in Rstudio it shows me all the files but won't let me do anything with them and if I ask for the history I get an empty area. I wonder if the issue is with Rstudio not git. If I got to Tools, Project Options I just get a spinner at the top saying "Reading options" and if I try to quit Rstudio after that I get another spinner saying "quitting Rstudio" (or something like that) but no quit unless I hit the close button again. That doesn't happen if I just open the project and then quit Rstudio: it just quits. The contents of the project file are:

root@Clevo1:/media/chris/Clevo_SSD2/Data/MyR/R/distill_blog/test2# cat test2.Rproj 
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX

BuildType: Website

This is a fresh install of Rstudio daily build #373 (I am having to use the daily build because of an incompatibility between the stable release and Ubuntu 22.04 (https://forum.posit.co/t/rstudio-ide-desktop-2022-02-0-443-not-working-on-ubuntu-22-04-lts-some-gui-issue/135876/4 ... oh yes, I do pick these issues). However, this was happening with the stable release under Mint before.

I would love to hear any other suggestions and really appreciate the help.