The exact steps I went through after installing git on the server.
cd /srv/shiny-server
git init
Navigate to github and create a new repo. Copy the URL for that repo.
git remote add origin <paste the url to the repo I just made>
git add .
git commit -m "Initial commit"
git push -u origin master
Then cloned onto a local machine with VS Code. The sample apps folder is also a symbolic link so I am not able to open the folder and see the contents.