VisualStudioのプロジェクトをGitで管理するための準備手順の一例を紹介します。
GitのホスティングサービスはGitLab(https://gitlab.com/)を用いることにします。またVisualStudio2017を用いることとします。
GitLabでリモートリポジトリ(Project)を作る
1.GitLabのダッシュボードを開き、[New project]をクリックします。

2.[Create blank project/repository]をクリックします。

3.Project name欄にプロジェクトの名前を適宜入力し(①)、[Create project]をクリックします(②)。
“Initialize repositry with a README”のチェックはつけないでください。もしつけた場合は以降の本記事の手順をそのまま行うとリモートリポジトリとローカルリポジトリとの紐付けに失敗します。

4.[Clone]ボタンをクリックし(①)、”Clone with HTTPS”の内容は後で使うのでエディターにコピペなどしておきます(②)。

VisualStudioで新しいプロジェクトを作る
VisualStudioを起動します。
1.[ファイル]→[新規作成(N]→[プロジェクト(P)…]をクリックします。

2.新しいGitリポジトリの作成(G)のチェックをつけ(①)、その他の入力は適宜対応のうえで[OK]をクリックします(②)。

3.[表示(V)]→[チームエクスプローラ(M)]をクリックします。

4.接続マークをクリックします。

5.チームエクスプローラの”ローカルGitリポジトリ”の項目で上記で作成したプロジェクトの場所(①)のローカルリポジトリが太字になっていることを確認します(②)。

リモートリポジトリとローカルリポジトリを紐付ける
上記から作業が続いている前提で紹介します。
1.家のマークをクリックします。

2.[同期]をクリックします。

3.[Gitリポジトリを発行]をクリックします。

4.GitLabでリモートリポジトリ(Project)を作るの4で取得したURLを入力し(①)、[公開(U)]をクリックします(②)。

GitLab上で上記で作成したProjectを確認すると、VisualStudioで作成したプロジェクトの内容が保管されていることが分かるかと思います。

以上となります。参考になれば幸いです。