vscodeとgitの接続方法の備忘録

作成したリポジトリから git clone <repository url>

クローンしたリポジトリに移動 cd <repository name>
(git cloneすれば、vscodeで開いているディレクトリにリポジトリが追加される)

gitの設定入力
```
git config --global user.name '<ユーザーネーム>'
git config --global user.email '<gitアドレス⇨〜@users.noreply.github.com>'

git config --list で設定情報を確認して下記情報がない場合追加
git config --global core.editor 'code --wait'
git config --global merge.tool 'code --wait "$MERGED"'
git config --global push.default simple

vscodeのリモートにgit URLを指定
```
git remote set-url origin https://<username>:<token>@github.com/<username>/<repository name>
```

最後に

git push origin main:main

で接続を確認

これで完了。

この記事が気に入ったらサポートをしてみませんか?