diff --git a/generators/upgrade/index.js b/generators/upgrade/index.js
index <HASH>..<HASH> 100644
--- a/generators/upgrade/index.js
+++ b/generators/upgrade/index.js
@@ -151,7 +151,7 @@ module.exports = UpgradeGenerator.extend({
                     if (code !== 0) this.error('Unable to record current code has been generated with version ' +
                         this.currentVersion + ':\n' + msg + ' ' + err);
                     this.log('Current code recorded as generated with version ' + this.currentVersion);
-                    this._gitCheckout(UPGRADE_BRANCH, done);
+                    done();
                 }.bind(this));
             }.bind(this);
 
@@ -195,6 +195,11 @@ module.exports = UpgradeGenerator.extend({
             }.bind(this));
         },
 
+        checkoutUpgradeBranch: function() {
+            var done = this.async();
+            this._gitCheckout(UPGRADE_BRANCH, done);
+        },
+
         generateWithLatestVersion: function() {
             var done = this.async();
             this._regenerate(this.latestVersion, done);
Upgrade submodule doesn't commit on jhipster_upgrade branch from second
upgrade

Fix #<I>