mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-25 07:28:35 +02:00
[FeatureRequest] git push --force beta Resolves #185
This commit is contained in:
parent
cb776e1b4e
commit
7fc33541cc
3 changed files with 22 additions and 8 deletions
|
@ -1062,13 +1062,15 @@ GitEngine.prototype.push = function(options) {
|
|||
var sourceLocation = this.resolveID(options.source || 'HEAD');
|
||||
|
||||
// first check if this is even allowed by checking the sync between
|
||||
this.checkUpstreamOfSource(
|
||||
this,
|
||||
this.origin,
|
||||
branchOnRemote,
|
||||
sourceLocation,
|
||||
intl.str('git-error-origin-push-no-ff')
|
||||
);
|
||||
if (!options.force) {
|
||||
this.checkUpstreamOfSource(
|
||||
this,
|
||||
this.origin,
|
||||
branchOnRemote,
|
||||
sourceLocation,
|
||||
intl.str('git-error-origin-push-no-ff')
|
||||
);
|
||||
}
|
||||
|
||||
var commitsToMake = this.getTargetGraphDifference(
|
||||
this.origin,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue