git workflow - Git - get given range of lines from given file from given branch -


i wonder if it's possible given range of lines given file given branch in git? i'm working on pretty big project, reloading whole solution after switching new branch lasts few seconds, need see history / version of current file e.g. master. possible without switching master?

you can use cat-file print content:

git cat-file blob feature/my-feature:./readme 

and pass example sed line range:

git cat-file ... | sed -n '10,20p' 

Comments