While regularly working with multiple repo, you may want to update them in one go.
- Use
git up
instead ofgit pull
:
git config --global alias.up '!git remote update -p; git merge --ff-only @{u}'
and here is why.
- Create a bash script to update all repos [1]
#!/bin/sh
for repo in bean beanex banana; do
echo "Updating git repo's in directory: ${repo}"
(cd "$GOPATH/src/${repo}" && git checkout master && git up)
done
I put this script as go/bin/pull
- Similarly you can push several repos in one go
#!/bin/sh
for repo in bean beanex banana; do
echo "pushing git repo's in directory: ${repo}"
(cd "$GOPATH/src/${repo}" && git push origin master)
done