Skip to content

Commit 5365e75

Browse files
authored
Update git show TIL
1 parent 10e2db5 commit 5365e75

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git/viewing-a-file-on-another-branch.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
Sometimes you want to view a file on another branch (without switching
44
branches). That is, you want to view the version of that file as it exists
5-
on that branch. `git show` can help. If your branch is named `my_feature` and
5+
on that branch. `git show` can help. If the other branch is named `some_branch` and
66
the file you want to see is `app/models/users.rb`, then your command should
77
look like this:
88

99
```
10-
$ git show my_feature:app/models/users.rb
10+
$ git show some_branch:app/models/users.rb
1111
```
1212

1313
You can even tab-complete the filename as you type it out.
1414

1515
See `man git-show` for more details.
1616

17-
[source](http://stackoverflow.com/questions/7856416/view-a-file-in-a-different-git-branch-without-changing-branches)
17+
[source](https://stackoverflow.com/questions/7856416/view-a-file-in-a-different-git-branch-without-changing-branches)

0 commit comments

Comments
 (0)