ドキュメントには頻繁に更新が加えられ、その都度公開されています。本ページの翻訳はまだ未完成な部分があることをご了承ください。最新の情報については、英語のドキュメンテーションをご参照ください。本ページの翻訳に問題がある場合はこちらまでご連絡ください。

Cherry-picking a commit

You can pick a specific commit on one branch and copy the commit to another branch.

ここには以下の内容があります:

About Git cherry-pick

You can cherry-pick a commit on one branch to create a copy of the commit with the same changes on another branch. If you commit changes to the wrong branch or want to make the same changes to another branch, you can cherry-pick the commit to apply the changes to another branch. You can also use cherry-picking to apply specific changes before you are ready to create or merge a pull request. For example, if you commit a bug fix to a feature branch, you can cherry-pick the commit with the bug fix to other branches of your project.

You can also use cherry-picking when collaborating with a team. Some projects incorporate contributions by cherry-picking commits. For more information, see Distributed Git - Maintaining a Project in the Git documentation.

Cherry-picking a commit

  1. GitHub Desktopで、Current Branch(現在のブランチ)をクリックしてください。
    現在のブランチのドロップダウンメニュー
  2. In the list of branches, click the branch that has the commit that you want to cherry-pick.
  3. History(履歴)をクリックしてください。
    サイドバーで選択されている履歴タブ
  4. Drag the commit that you want to cherry-pick to the Current Branch menu and drop the commit on the branch that you want to copy the commit to.
    Dragging a commit to another branch in the Current Branch menu

参考リンク

Did this doc help you?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

OR, learn how to contribute.