Skip to content

Commit b238e44

Browse files
committed
git show
1 parent 1683037 commit b238e44

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
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>
677678
git 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 -->

tips.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,4 +302,7 @@
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
}]

0 commit comments

Comments
 (0)