diff --git a/src/git.js b/src/git.js index 5e790185..471271eb 100644 --- a/src/git.js +++ b/src/git.js @@ -727,6 +727,13 @@ GitEngine.prototype.rebaseStarter = function() { }; GitEngine.prototype.rebase = function(targetSource, currentLocation) { + var targetObj = this.resolveID(targetSource); + if (targetObj.get('type') !== 'branch') { + throw new GitError({ + msg: 'Only rebase onto branches! Not individual commits' + }); + } + // first some conditions if (this.isUpstreamOf(targetSource, currentLocation)) { throw new CommandResult({