Skip to content

Instantly share code, notes, and snippets.

@fffaraz
Last active December 23, 2022 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fffaraz/b6ed2d291063024152ec66334c0029bd to your computer and use it in GitHub Desktop.
Save fffaraz/b6ed2d291063024152ec66334c0029bd to your computer and use it in GitHub Desktop.
git pull
@echo off
for /d %%D in (*) do (
cd %%D
echo %%D
git pull
cd..
)
#!/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