Bantako's notes garden

Home

❯

03 Permanent

❯

gitで別ブランチのファイルをパッチ適用する

gitで別ブランチのファイルをパッチ適用する

2025年12月07日1 min read

  • git
  • cli

gitで別ブランチのファイルをパッチ適用する

git restore で可能。 git-restore – Git コマンドリファレンス(日本語版)

git restore -p --source=A -- path/to/file

-p でパッチ適用モードになる。--source で指定したブランチから path/to/file を取得し、対話的にパッチを適用できる。


グラフビュー

作成 Quartz v4.5.2 © 2025

  • GitHub
  • Discord Community