rebase instead of pulling to get rid of merge master branch objects
authorBaris Metin <Talip-Baris.Metin@sophia.inria.fr>
Fri, 18 Jun 2010 14:06:32 +0000 (16:06 +0200)
committerBaris Metin <Talip-Baris.Metin@sophia.inria.fr>
Fri, 18 Jun 2010 14:06:32 +0000 (16:06 +0200)
scripts/git-mirror.sh

index 5f42d64..de846f0 100755 (executable)
@@ -15,7 +15,8 @@ function mirror () {
            echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx pulling from ${REPO_NAME}"
             pushd ${REPO}
             git fetch origin --tags
-            git pull origin master
+            git fetch origin
+            git rebase origin
             popd
         else
             echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mirroring in ${REPO_NAME} for the first time"
@@ -28,8 +29,9 @@ function mirror () {
         echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx pushing ${REPO_NAME} to local master"
         pushd ${REPO}
         git fetch local_master --tags
-        git pull local_master master
-            
+        git fetch local_master
+        git rebase local_master
+
         git push local_master
         git push --tags local_master
         popd