File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
Sometimes you want to view a file on another branch (without switching
4
4
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
6
6
the file you want to see is ` app/models/users.rb ` , then your command should
7
7
look like this:
8
8
9
9
```
10
- $ git show my_feature :app/models/users.rb
10
+ $ git show some_branch :app/models/users.rb
11
11
```
12
12
13
13
You can even tab-complete the filename as you type it out.
14
14
15
15
See ` man git-show ` for more details.
16
16
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)
You can’t perform that action at this time.
0 commit comments