문제

Let's say I have a Git repo with branch A and branch B.
Branch B is currently checked out (i.e. .git/HEAD contains refs/heads/B).
Now, without checking out branch A, how to view the history (log) of path/file in branch A?

Following git help rev-parse, I've attempted to use git log A:path/file, but that doesn't seem to work (outputs nothing). Why?

도움이 되었습니까?

해결책

Try this (without the angle brackets):

git log <branch> -- <path/to/file>

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top