Not able to analyze properties of text in git bash

Viewed 22

I have committed a few test text from my vim editor to a sample main branch.

When I use $cat (commit) to view various versions across branches, my editor simply clears as if I typed $clear.

1 Answers

You can use git show to see the content of a file in a different branch

git show somebranch:path/to/your/file

Or you can define a git cat alias

[alias]
  cat = "!git show \"$1:$2\" #"

Which means you can type git cat somebranch path/to/your/file.

Related