git - How to checkout files from another branch based on diff-filter?

时间:2015-07-28 17:10:29

标签: git git-branch git-diff

Let's say I want to checkout all the files from another branch that are missing from my current branch.

I know I can find these files by doing a git diff OTHER-BRANCH diff-filter=D because all files considered deleted are ones that my current branch is missing.

Is there a way to do a git checkout OTHER-BRANCH --diff-filter=D of some sort? Or perhaps you have to pipe all the files from the git diff into a git checkout?

1 个答案:

答案 0 :(得分:1)

-0

使用xargs -0标志(onActivityResult())表示复杂的文件名。 不言而喻,您应该在测试新的git命令之前进行备份。

相关问题