Last active
December 23, 2022 18:54
-
-
Save fffaraz/b6ed2d291063024152ec66334c0029bd to your computer and use it in GitHub Desktop.
git 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
@echo off | |
for /d %%D in (*) do ( | |
cd %%D | |
echo %%D | |
git pull | |
cd.. | |
) |
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
#!/bin/bash | |
# Save the current directory | |
curr_dir=$(pwd) | |
# Get a list of all directories in the current directory | |
dirs=$(ls -d */) | |
# Iterate through each directory | |
for dir in $dirs; do | |
# Go into the directory | |
cd "$dir" | |
echo -e "\n--- $dir ---" | |
# Run git pull | |
git pull | |
# Go back to the original directory | |
cd "$curr_dir" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment