アプリ作成からgithubとの連携までの流れ
①ターミナルで特定のディレクトリにアプリを作成
以下例
cd Downloads
npx create-next-app 名前
cd 名前
②githubを開いてください
「new」ボタンをタップし、リポジトリを作成
③「or create a new repository on the command line」のコードをコピーして、先ほど作成したディレクトリで貼り付け実行
④githubに戻ってファイルなどが追加されていれば成功している
クローンからpull requestまでの一連の手順
リポジトリをクローンする。
git clone リポジトリ名
リポジトリに移動
cd リポジトリ名
開発用ブランチを作成
git checkout -b develop
ステージングに移す
git add .
コミットする
git commit -m "メッセージ"
任意のブランチにpushする(stage,mainなど)
git push origin プッシュしたいブランチ名
メインブランチに移動
git checkout main
ローカルのmain(master)ブランチをリモートの最新に更新する
git pull origin main
作成した開発用ブランチを削除する
git branch -d ブランチ名