보관함

git 특정 디렉토리 하에 있는 모든 폴더를 cleanup (submodule 까지)

#!/bin/bash pushd ~/Work for i in */.git; do ( echo $i; cd $i/..; git restore .; git clean -d -fx; git submodule foreach –recursive git restore .; git submodule foreach –recursive git clean -d -xf; ); done popd

git 특정 디렉토리 하에 있는 모든 폴더를 pull (submodule 까지)

#!/bin/bash pushd ~/Work for i in */.git; do ( echo $i; cd $i/..; git pull; git submodule update –recursive; ); done popd

 

recursive 함수의 call 이 되는 순서

Tree의 구성이 1 2 3 와 같이 되어 있는 경우

123 순서로 부르고 싶을때

213 순서로 부르고 싶을때

231 순서로 부르고 싶을때