Run Sh Script to Mass Pull Directories of Bitbucket

git pull using sh script for multiple repository

Probuse Admin

This below script you can use it to reset --hard code and then git pull for mass/multiple directories/repositories. It will first find all the folders/directories in your current space on the terminal and then go to that directory one by one and run "git reset --hard" and "git pull" commands. So please make sure before running it.

--

for d in */ ; do

    echo "$d"

Odoo CMS- Sample image floating  

    cd "$d"

    git reset --hard

    git pull

    cd ..

done



--


Above script will first reset / erase you all changes in your local and then run pull command so make sure before running it.