Skip to content

Instantly share code, notes, and snippets.

View skew202's full-sized avatar
:octocat:
I may be fast to respond.

steven skew202

:octocat:
I may be fast to respond.
  • Ƨ0Ƨʍǝʞs@ןıɐɯƃ˙ɯoɔ
  • Melbourne
View GitHub Profile
@skew202
skew202 / git_pull_subdirs.sh
Created October 25, 2016 10:36
git command over subdirectories
# ind . searches the current directory
# -type d to find directories, not files
# -depth 1 for a maximum depth of one sub-directory
# -exec {} \; runs a custom command for every find
# git --git-dir={}/.git --work-tree=$PWD/{} pull git pulls the individual directories
find . -maxdepth 1 -type d -exec git --git-dir={}/.git --work-tree=$PWD/{} pull \;