2

I want to start git-bash.exe, and run git log from different directory.

I tried something like this:

"C:/Program Files/Git/git-bash.exe" log -- C:\repos\foo

and this

"C:\Program Files\Git\git-bash.exe" --cd=C:\repos\foo log

But none of theese works. Any ideas?

dafie
  • 951
  • 7
  • 25

1 Answers1

1

I just tested, in a regular CMD session (no bash):

git -C C:\path\to\repo log

It does work just fine, using the -C option I presented here, introduced in Git 1.8.5 (Q4 2013).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250