
Github リモートにプッシュ やり方
概要
リモートリポジトリを設定し、ローカルでの作業をリモートにプッシュするまでの手順をステップごとに解説します。
手順
GitHubでリモートリポジトリを作成します。
次に、作成したリモートリポジトリをローカルリポジトリに紐付けます。以下のコマンドをターミナルで実行してください。
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/{username}/{repository}.git
git push -u origin main