mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-25 23:48:34 +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
|
@ -674,6 +674,9 @@ var commandConfig = {
|
|||
|
||||
push: {
|
||||
regex: /^git +push($|\s)/,
|
||||
options: [
|
||||
'--force'
|
||||
],
|
||||
execute: function(engine, command) {
|
||||
if (!engine.hasOrigin()) {
|
||||
throw new GitError({
|
||||
|
@ -685,6 +688,7 @@ var commandConfig = {
|
|||
var destination;
|
||||
var source;
|
||||
var sourceObj;
|
||||
var commandOptions = command.getOptionsMap();
|
||||
|
||||
// git push is pretty complex in terms of
|
||||
// the arguments it wants as well... get ready!
|
||||
|
@ -737,7 +741,8 @@ var commandConfig = {
|
|||
// NOTE -- very important! destination and source here
|
||||
// are always, always strings. very important :D
|
||||
destination: destination,
|
||||
source: source
|
||||
source: source,
|
||||
force: !!commandOptions['--force']
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue