git-sync/org-sync

This commit is contained in:
2015-08-16 00:09:50 -07:00
parent f9724a16a5
commit 33f8a56109
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
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
}