33
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

別ブランチから特定のファイルを取得する方法

Posted at

addされた状態で取得

git checkout <取り込み元ブランチ> <取り込むファイル>

別ファイルとして取り込みたい場合 (unstaged状態)

git show <取り込み元ブランチ名>:path/to/file > path/to/local/file

コミットまるごと

コミットをそのまま取込

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

add済み

git cherry-pick -n <コミットハッシュ値>
33
26
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
33
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?