threads / discuss / 23711

Detecting GIT_DIR runtime

Subject: Detecting GIT_DIR runtime

## tl;dr

3 messages between May 5, 2010 and May 5, 2010.

replies: 2people: 3as markdown or json

Mahesh Vaidya· May 5, 2010, 15:38 UTC · lore

I have a tree like /home/mvaidya/WORKSPACE/nvos/mvaidya-master-100.local/some/folder

I would like to issue come command say "git fetch" from any level of the tree. How can I deduce path of .git folder. Reason I need it as I some application configuration saved in .git/workspace.properties and I need to some action before git fetch.

-- 
Thank you and best regards.
Mahesh Vaidya  / 9740500144
http://www.twitter.com/forvaidya
Tomas Carnecky· May 5, 2010, 16:54 UTC · re: Mahesh Vaidya · lore

Re: Detecting GIT_DIR runtime

On 5/5/10 5:38 PM, Mahesh Vaidya wrote:
Show 8 quoted lines
> I have a tree like
> /home/mvaidya/WORKSPACE/nvos/mvaidya-master-100.local/some/folder
>
> I would like to issue come command say "git fetch" from any level of
> the tree. How can I deduce path of .git folder. Reason I need it as I
> some application configuration saved in .git/workspace.properties and
> I need to some action before git fetch.
>

Take a look at: $ git rev-parse --cdup

tom
Jeff King· May 5, 2010, 18:14 UTC · re: Tomas Carnecky · lore

Re: Detecting GIT_DIR runtime

On Wed, May 05, 2010 at 06:54:33PM +0200, Tomas Carnecky wrote:
Show 12 quoted lines
> On 5/5/10 5:38 PM, Mahesh Vaidya wrote:
> >I have a tree like
> >/home/mvaidya/WORKSPACE/nvos/mvaidya-master-100.local/some/folder
> >
> >I would like to issue come command say "git fetch" from any level of
> >the tree. How can I deduce path of .git folder. Reason I need it as I
> >some application configuration saved in .git/workspace.properties and
> >I need to some action before git fetch.
> >
> 
> Take a look at:
> $ git rev-parse --cdup
Or even "git rev-parse --git-dir".
-Peff

← back to recent threads