【git cherry-pick】git pullで競合が起きずに、一つずつ確認して取り込みたいのに全部取り込んでしまう問題を解消

2025年1月26日Git


Warning: Undefined array key 4 in /home/god48/god48.com/public_html/wp-content/themes/luxech/functions.php on line 104

Warning: Undefined array key 6 in /home/god48/god48.com/public_html/wp-content/themes/luxech/functions.php on line 109
git

kamiです。

今回はgit pullで競合が起きずに、一つずつ確認して取り込みたいのに全部取り込んでしまう問題を解消の紹介です。

git log –onelineで現在のブランチで過去のコミットハッシュを確認

現在のブランチで過去のコミットハッシュを確認することができます。

git log --oneline

git log –onelineのログ

git log --oneline
m74jch5 (HEAD -> develop, origin/master) Merge pull request #2 from test_app/develop
3pa0vc5 (origin/feature/kami, origin/develop, origin/HEAD) nodeのバージョン変更
c43fa1c Merge pull request #1 from test_app/develop
a1c299ep 環境構築

スポンサードサーチ

git cherry-pick

特定のコミットをマージしたい場合はgit cherry-pickを行います。

git cherry-pick ハッシュ値
icon

以上になります

GitGit

Posted by kami