4
1
How I can get current working dir from console using git
?
something like: if I'm in: ~/projects/someproject/somesubfolder/
, the console command should say /home/va1en0k/someproject/
(if there is a .git/
folder in this directory or something like this)
or if GIT_WORKING_DIR
is set, it should return it. or whatever Git uses to determine it
10I looked at git-rev-parse(1). It seems like "git rev-parse --show-toplevel" will suffice. Thank you! :-) – valya – 2011-04-10T19:03:57.503