Note that there are some explanatory texts on larger screens.

plurals
  1. POParsing the output of "git submodule foreach 'git status'"
    primarykey
    data
    text
    <p>I have a Git super project with many submodules. I'd like to be able to go through the submodules and run <code>git status</code> so that I can quickly see which branch each submodule is on and whether there are uncommitted changes. However when I run <code>git submodule foreach 'git status'</code> it is difficult to parse and I can't tell which submodule it's reporting the status for. It appears to just spew out my %PATH% variable (I'm using msysGit on Windows). My output appears similar to that shown here:</p> <pre><code>Entering 'C:\Program Files\Git/libexec/git-core;C:\Program Files\Git\libexec\git-core;C:\Program Files\Git\libexec\git-core;C:\Program Files\Git\bin;c:\Documents and Settings\username\My Documents\LinuxHome\bin;.;C:\Program Files\Git\local\bin;C:\Program Files\Git\mingw\bin;C:\Program Files\Git\bin;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\Program Files\Intel\WiFi\bin\;c:\Program Files\Windows Imaging\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files\TortoiseSVN\bin' # On branch My_Branch nothing to commit (working directory clean) Entering 'C:\Program Files\Git/libexec/git-core;C:\Program Files\Git\libexec\git-core;C:\Program Files\Git\libexec\git-core;C:\Program Files\Git\bin;c:\Documents and Settings\username\My Documents\LinuxHome\bin;.;C:\Program Files\Git\local\bin;C:\Program Files\Git\mingw\bin;C:\Program Files\Git\bin;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\Program Files\Intel\WiFi\bin\;c:\Program Files\Windows Imaging\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files\TortoiseSVN\bin' # On branch My_Branch # Your branch is ahead of 'FlashDrive/My_Branch' by 10 commits. # nothing to commit (working directory clean) Entering 'C:\Program Files\Git/libexec/git-core;C:\Program Files\Git\libexec\git-core;C:\Program Files\Git\libexec\git-core;C:\Program Files\Git\bin;c:\Documents and Settings\username\My Documents\LinuxHome\bin;.;C:\Program Files\Git\local\bin;C:\Program Files\Git\mingw\bin;C:\Program Files\Git\bin;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\Program Files\Intel\WiFi\bin\;c:\Program Files\Windows Imaging\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files\TortoiseSVN\bin' # On branch My_Branch # Changes not staged for commit: # (use "git add &lt;file&gt;..." to update what will be committed) # (use "git checkout -- &lt;file&gt;..." to discard changes in working directory) # # modified: MyApp/Win32/Release/MyApp.exe # modified: MyApp/WinCe600 (ARMV4I)/Release/MyApp.exe # modified: MyApp/WinCe600 (ARMV4I)/Release/Startup.exe # no changes added to commit (use "git add" and/or "git commit -a") Entering 'C:\Program Files\Git/libexec/git-core;C:\Program Files\Git\libexec\git-core;C:\Program Files\Git\libexec\git-core;C:\Program Files\Git\bin;c:\Documents and Settings\username\My Documents\LinuxHome\bin;.;C:\Program Files\Git\local\bin;C:\Program Files\Git\mingw\bin;C:\Program Files\Git\bin;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\Program Files\Intel\WiFi\bin\;c:\Program Files\Windows Imaging\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files\TortoiseSVN\bin' # On branch My_Branch # Your branch is ahead of 'FlashDrive/My_Branch' by 8 commits. # nothing to commit (working directory clean) </code></pre> <p>As you can see, this is quite difficult to glance at (especially when the output is wrapped) and see what the output of 'git status'. In addition the name of each submodule is not shown so I have no way of knowing which submodule each section of output refers to.</p> <p>Any help is appreciated! Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload