LoginSignup
0
0

More than 1 year has passed since last update.

【Git】cherry-pick

Posted at

cherry-pick

他のブランチで必要なコミットを現在のブランチにコピーしたいときに便利なcherry-pickコマンドを紹介します。

別のブランチのコミットを今のブランチにコピーしコミットします。

$ git cherry-pick <コミットのハッシュ値>

上記は取り込んだ内容がそのまま、コミットされます。
コミットをせず、ワークツリー内に反映するだけの場合は-nオプションを使います。

$ git cherry-pick -n <コミットのハッシュ値>

参考

第10話 git cherry-pick でいいとこ取り!【連載】マンガでわかるGit ~コマンド編~ - itstaffing エンジニアスタイル

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0