tags:

views:

44

answers:

1

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 ?

+3  A: 

from, man git:

you can do it with the --git-dir parameter, before passing any commands.

git --git-dir=/foo/bar log
bad zeppelin
I try it but it does not work :/
AurelienB
You have to reference the `.git` directory. Try `git --git-dir=/foo/bar/.git log`.
mipadi
sorry, my wrong you don't put the = between --git-dir and directory name. so it becomes git --git-dir /foo/bar log
bad zeppelin