git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: using aliases within the subdirectory

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Apr 13, 2011, 12:18 UTC
Message-ID
<4DA59480.5080307@drmicha.warpmail.net>
In-Reply-To
<4DA579CA.5030908@ge.infn.it>
Matej Batic venit, vidit, dixit 13.04.2011 12:24:
Show 15 quoted lines
> Dear all,
> 
> I am facing a problem, noted previously in
>     
> http://git.661346.n2.nabble.com/git-alias-always-chdir-to-top-td1609456.html  
> 
>     http://kerneltrap.org/mailarchive/git/2010/5/5/29818/thread
> which in practice means that I cannot pass the " -- 
> relative_path_to_some_file_in_the_tree" argument to my alias.
> 
> Is there any way to get the current working dir before git changes dir 
> to root directory?
> 
> Best regards,
> Matej

This may depend on your shell and rc files, but for me, $PWD gives the original current working dir.

Also, revisiting that topic after 1.7.5 seems worthwhile.
Michael
Previous: Matej BaticNext: Michael J Gruber
Message 2 of 3 in “using aliases within the subdirectory”
  1. Matej BaticApr 13, 2011
  2. Michael J GruberApr 13, 2011
  3. Michael J GruberApr 13, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.