Skip to content

Commit 0e8e45d

Browse files
author
stefdelec
committed
feat(force): git rebase and push
1 parent 2f7a8cd commit 0e8e45d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,10 @@ shortcut for
7070
```
7171
git add . && git commit --amend --no-edit
7272
```
73+
74+
## force
75+
rebase on develop or branch + push force
76+
77+
```gitool -force```
78+
```gitool -force -branch=master```
79+
```gitool -fb=master```

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const argv = require('yargs')
1414
.alias('l', 'last')
1515
.alias('g', 'groupBy')
1616
.alias('bu','bump')
17+
.alias('b','branch')
1718
.argv
1819

1920
const { prettyPrint, write } = require('./src/commit-prettier/commit-prettier');
@@ -83,6 +84,11 @@ if (argv.messageComposer) {
8384
}
8485
}
8586

87+
if(argv.force){
88+
const branch=argv.branch || 'develop';
89+
shortCut.ex(`git add . && git commit --amend --no-edit && git fetch && git pull origin ${branch} --rebase && git push origin HEAD --force`);
90+
}
91+
8692
if(argv.cane){
8793
shortCut.ex('git add .')
8894
shortCut.ex('git commit --amend --no-edit')

0 commit comments

Comments
 (0)