GitHub の新しいリポジトリをローカルに追加する方法を書いておく(よく忘れるので)
まずvscodeに追加するgithubのリポジトリのHTTPSを画像のところで取得しておく。
そしてターミナル上で
git init
git remote add origin https://github.com/your-username/your-new-repo.git
を実行する。「https://github.com/your-username/your-new-repo.git」 のところは各自変える。そして
git add .
git commit -m "Initial commit"
これはいつも通り
git branch -M main # メインブランチを "main" に設定
git push -u origin main
で終了です。