Skip to content

Instantly share code, notes, and snippets.

@misteral
Created June 8, 2012 09:34
Show Gist options
  • Save misteral/2894718 to your computer and use it in GitHub Desktop.
Save misteral/2894718 to your computer and use it in GitHub Desktop.
repostories pull&push
#!/bin/bash
PREFIX=`date +%F`
g=`find ~/projects/ -name .git -maxdepth 2`
for repo in ${g[@]}
do
cd ${repo}
cd ..
echo `pwd`
#git add .
#git commit -m "pull on [`date +%F--%H-%M`]"
git pull
done
#!/bin/bash
PREFIX=`date +%F`
g=`find ~/projects/ -name .git -maxdepth 2`
for repo in ${g[@]}
do
cd ${repo}
cd ..
echo `pwd`
git add .
git commit -m "pull on [`date +%F--%H-%M`]"
git push
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment