>From Damien Robert, Wed 26 Feb 2020 at 18:23:41 (+0100) : > 2) Now add the following alias: > subs="! git -C baz status" > > 3) And run it > git subs > > To get: > ~~~ > On branch master > Untracked files: > (use "git add <file>..." to include in what will be committed) > ../2 > > nothing added to commit but untracked files present (use "git add" to track) > ~~~ Ok, so using GIT_TRACE and GIT_TRACE_STATUS and doing some debugging I understand the cause of the bug. When using the alias, the GIT_DIR environment is set to the bar module: GIT_DIR=/tmp/test/foo/.git/modules/bar and is exported. That's explain why in `baz` the status report the status of the `bar` directory.