<目次>
Gitでブランチ間の差分を確認してマージ(差分を取り込み)する方法
やりたいこと/背景
STEP1:ローカル環境のmainブランチが最新か?を確認
STEP2:遅れているブランチに切り替え
STEP3:mainブランチの変更を遅れているブランチに反映
STEP4:変更をリモートリポジトリにプッシュ
Gitでブランチ間の差分を確認してマージ(差分を取り込み)する方法
やりたいこと/背景
STEP1:ローカル環境のmainブランチが最新か?を確認
> git checkout main > git pull
Switched to branch 'main' Your branch is up to date with 'origin/main'.
remote: Enumerating objects: 5, done. remote: Counting objects: 100% (5/5), done. remote: Compressing objects: 100% (5/5), done. remote: Total 5 (delta 0), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (5/5), 3.65 KiB | 287.00 KiB/s, done. From https://github.com/your-repo-name/slack-chatbot-openai-plain 4832708..c90d385 main -> origin/main * [new branch] feature/aaa -> origin/feature/aaa * [new branch] feature/bbb -> origin/feature/bbb * [new branch] feature/ccc -> origin/feature/ccc * [new branch] feature/ddd -> origin/feature/ddd * [new branch] feature/eee -> origin/feature/eee Updating 4832708..c90d385 Fast-forward app.py | 56 ++-------------- azure_table_utils.py | 38 +++++++++++ conversation_util.py | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++ env_sample.py | 21 +++++- log_utils.py | 13 ++++ requirements.txt | 7 +- respond_to_message.py | 146 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 412 insertions(+), 51 deletions(-) create mode 100644 aaa.py create mode 100644 bbb.py create mode 100644 ccc.py create mode 100644 ddd.py
STEP2:遅れているブランチに切り替え
> git checkout [your_branch]
STEP3:mainブランチの変更を遅れているブランチに反映
> git merge main
> git rebase main
Successfully rebased and updated refs/heads/feature/loading-message.
STEP4:変更をリモートリポジトリにプッシュ
> git push origin [your_branch]
↓
(図412)
(実行結果例)
Enumerating objects: 5, done. Counting objects: 100% (5/5), done. Delta compression using up to 8 threads Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 409 bytes | 409.00 KiB/s, done. Total 3 (delta 2), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (2/2), completed with 2 local objects. To https://github.com/your-repo-name/slack-chatbot-openai-plain.git 21b734d..4c30759 feature/loading-message -> feature/loading-message