Skip to main content

Timeline for git: get current working dir

Current License: CC BY-SA 3.0

5 events
when toggle format what by license comment
Sep 2, 2020 at 7:30 comment added Radon8472 The problem is, that git rev-parse --show-toplevel and your comment both dont work when you are in the .git dir e.g. in a hook-script
Mar 9, 2020 at 17:14 comment added Kamil Maciorowski Is the outer command substitution really needed here? Running in a subshell ((cd … ; pwd)) may be enough. Please see What is wrong with echo $(stuff)?
Apr 15, 2011 at 21:15 vote accept valya
Apr 10, 2011 at 19:03 comment added valya I looked at git-rev-parse(1). It seems like "git rev-parse --show-toplevel" will suffice. Thank you! :-)
Apr 10, 2011 at 19:00 history answered George V. Reilly CC BY-SA 3.0