What you want to do is possible. I am currently doing it, solution and all.
The first steps for me after installing the command line git tools is outlined here
This assumes a new github repository and an already in progress vs solution.
These steps should get your current project on github. After that I found that GithubDesktop was easier to use and to understand than trying to use VS 2019 Community.