Skip to main content
added 2 characters in body
Source Link
Sathyajith Bhat
  • 61.9k
  • 38
  • 181
  • 265

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_DIRGIT_WORKING_DIR is set, it should return it. or whatever Git uses to determine it

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

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

Source Link
valya
  • 928
  • 3
  • 14
  • 30

git: get current working dir

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