]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
Reset local integration branch before merging with the branch to be built
authorSzymon Bochniak <szymon.bochniak@profitbricks.com>
Tue, 30 Jul 2013 15:04:35 +0000 (17:04 +0200)
committerSzymon Bochniak <szymon.bochniak@profitbricks.com>
Tue, 30 Jul 2013 15:04:35 +0000 (17:04 +0200)
.gitignore
maven_pre_build_debian_wrapper.sh

index 3220327edf0c1633890156d61689b8cff78f6181..2b76de4bb77b038e88f0cd275272f5edc879721e 100644 (file)
@@ -2,3 +2,4 @@
 */*\.pyc
 *\.pyc
 Packages*
+.idea
index 93445e56a0ea7b5018effe9770d7757acbeaca17..0978b014bc42c451d1db3913daff8e391187c2c4 100755 (executable)
@@ -36,9 +36,10 @@ if [[ ${GIT_BRANCH_NAME:0:8} = "feature/" ]] || [[ ${GIT_BRANCH_NAME:0:7} = "bug
         #
         echo "Switching to integration branch..."
         git checkout integration
-        git pull origin integration
-        echo "Trying to fast-forward merge $GIT_BRANCH_NAME..."
-        git fetch origin -fp
+        echo "Fetching from remote..."
+        git fetch origin --prune
+        echo "Resetting integration branch to remote state..."
+        git reset --hard refs/remotes/origin/integration
         figlet "integration merge"
         git merge --no-ff origin/$GIT_BRANCH_NAME
     fi