I am trying to list all untracked files in all submodules recursively:
git submodule foreach --recursive git ls-files --others --exclude-standard --full-name
But this does not list the absolute path, it gives the relative path to the submodule's folder.
How should I modify my command?
Thanks to torek for the idea. This works:
git submodule foreach --quiet 'a=$(printf "$(git ls-files --others --exclude-standard --full-name|sed "s~^~$(pwd)/~")"; printf x); a=${a%x}; echo "$a"' | sed '/^\s*$/d'