Git copy file from another branch without staging it

前端 未结 2 906
执念已碎
执念已碎 2021-01-06 09:01

I\'ve found how you can copy a file wholesale from one branch to another:

Edit please note, if you think this question is a duplicate

2条回答
  •  半阙折子戏
    2021-01-06 09:33

    you could use git show and then redirect... it's not very elegant, though

    git show feature-B:directory/somefile.php > directory/somefile.php
    

提交回复
热议问题