[英]checkout a file from a different branch into a different path in your current branch
所以我知道我們可以使用以下方法將文件從其他分支簽出到當前工作的分支中:
git checkout [someOtherBranch] [path/to/file]
我希望這樣的事情是可能的:
git checkout [someOtherBranch] [path/to/file] [path/we/want/to/copy/to]
這可能嗎?
您可以對文件的內容進行分類,然后使用標准的Shell重定向將其放置在所需的位置。
git show [someOtherBranch]:path/to/file > newpath/to/file
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.