2015-08-16 00:10:34 -07:00

14 lines
275 B
Bash

function git-sync {
local target="$1"
local destination="$2"
cd "$destination"
git fetch origin
# This won't work for branches other than master
git rebase origin/master
rsync -t $target/* $destination
git commit -am "$(date)"
git push origin HEAD
git clean -fd
}