My output log will be like this:
---------
/home/user/Source
On branch master
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
till
/home/user/Source/Main_B/
On branch master
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
/home/user/Source/Main_B/Test/xyz/abc/
On branch bug_fix
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
---------
Please note that /home/user/Source/Main_B/Test/xyz/abc/ has ".git" subdir.
ie /home/user/Source/Main_B/ is parent git, /home/user/Source/Main_B/Test/xyz/abc/ is child1 git.
---------- Post updated at 03:42 AM ---------- Previous update was at 02:23 AM ----------
hi again,
right now im using repo command for the same
repo forall -c "git status" > status.log
In log file i DO NOT get the folder path in which git the files are modified/added/deleted.Hmm, i can get folder path of added/modified files with find/locate command.
For deleted files how do i get the folder path.
Any thoughts
---------- Post updated at 08:17 AM ---------- Previous update was at 03:42 AM ----------
I have no idea of git. but if you want checks about .git dir,
you can do something like:
while read path
do
if [ -d "$path/.git" ];then
echo ".git exists. git status can be performed"
else
echo "git doesnt exists, $path has been skipped"
fi
done < dir_file
dir_file has the directories path you mentioned above.
i.e