IchHabRecht icon

[GIT] Perform Git update on subdirectories

IchHabRecht | PRO | 08/05/13 12:04:33 PM UTC | 0 ⭐ | 335 👁️ | Never ⏰ | []
Bash |

180 B

|

None

|

0 👍

/

0 👎

#!/bin/sh
find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && if git status | grep -q \"nothing to commit\"
then
git pull
else
git stash && git pull && git stash pop
fi" \;

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎