4 echo "Usage: $0 upstream origin" >&2
10 local_repo="`basename \"$origin\" .git`"
12 if [ -d "$local_repo"/.git ]; then
17 git remote add upstream "$upstream" &&
18 git remote set-url origin "$origin"
20 git clone -o upstream "$upstream" "$local_repo" &&
22 git remote add origin "$origin"
25 pwd >> "`dirname \"$0\"`"/locate-all.list &&
27 chmod a-x .git/config &&
28 branch="`git rev-parse --abbrev-ref HEAD`"
30 git pull upstream $branch &&
31 git pull origin $branch &&
32 git push -u origin $branch &&
34 git config branch.$branch.remote upstream &&
35 git config branch.$branch.remotepush origin &&
36 git config branch.$branch.merge refs/heads/$branch &&
37 git config push.default current &&
39 exec git gc --aggressive