Created
November 22, 2022 13:50
-
-
Save weilueluo/86eccabbb009867fc8c2195153bc0e7d to your computer and use it in GitHub Desktop.
for every repo in the current directory, checkout master, reset --hard and pull
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -mindepth 1 -maxdepth 1 -type d -print | xargs -I {} bash -c 'git -C {} rev-parse --is-inside-work-tree &> /dev/null && echo {} && git -C {} checkout master && git -C {} reset --hard && git -C {} pull' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment