File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 9999* [ Remove entry in the global config.] ( https://github.com/git-tips/tips#remove-entry-in-the-global-config )
100100* [ Checkout a new branch without any history] ( https://github.com/git-tips/tips#checkout-a-new-branch-without-any-history )
101101* [ File diff between staging and the last file version.] ( https://github.com/git-tips/tips#file-diff-between-staging-and-the-last-file-version )
102+ * [ Extract file from another branch.] ( https://github.com/git-tips/tips#extract-file-from-another-branch )
102103
103104<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
104105<!-- @doxie.inject end toc -->
@@ -677,5 +678,10 @@ git checkout --orphan <branch_name>
677678git diff --staged
678679```
679680
681+ ## Extract file from another branch.
682+ ``` sh
683+ git show < banch_name> :< file_name>
684+ ```
685+
680686<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
681687<!-- @doxie.inject end -->
Original file line number Diff line number Diff line change 302302},{
303303 "title" : " File diff between staging and the last file version." ,
304304 "tip" : " git diff --staged"
305+ },{
306+ "title" : " Extract file from another branch." ,
307+ "tip" : " git show <banch_name>:<file_name>"
305308}]
You can’t perform that action at this time.
0 commit comments