Index: trunk/UTIL/pre-push
===================================================================
--- trunk/UTIL/pre-push	(revision 3448)
+++ trunk/UTIL/pre-push	(revision 3449)
@@ -4,9 +4,26 @@
 # check if on master
 local_branch=$(git branch --show-current)
+
+echo Branch: $local_branch
+
+echo done
 if [ ${local_branch} != "master" ]; then
     # exit 0 # if on other branch than master, do not sync with svn
+    use_hook=false
+    while read local_ref local_oid remote_ref remote_oid; do
+        # echo $local_ref $local_oid $remote_ref $remote_oid
+        if test $local_ref = "refs/heads/master"; then
+            use_hook=true
+        fi
+    done
+    if test $use_hook = "false" ;then
+        echo "Sync with svn not necessary, no changes in master to be pushed."
+        echo "Continuing with push on $local_branch."
+        exit 0 # push only on local branch
+    fi
     git checkout master
-    git pull origin master
+    git pull --rebase origin master
 fi
+
 # git update-ref refs/remotes/git-svn refs/remotes/origin/master # what's this supposed to do?
 
