AlphaB AlphaB - 1 year ago 104
Git Question

Use git "log" command in another folder

I have some php files in a Folder A (which is a git project). In these php file I want to execute "git log" but for the folder B. Folder B is another git project (so log is different between A and B).

How I can do that with shell command ?

Answer Source

From, man git:

You can do this with the --git-dir parameter, before passing any commands.

git --git-dir /foo/bar/.git log
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download