File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ includes:
42
42
{{.ROOT_DIR}}/metapkg
43
43
{{.ROOT_DIR}}/terrarium/dl_repmanager/dl_repmanager_tests/testrepo/lib/testing_pkg_boilerplate
44
44
{{.ROOT_DIR}}/terrarium/bi_ci/bi_ci_tests/unit/resources
45
+ PARENT_BRANCH : ' {{.PARENT_BRANCH | default "main"}}'
45
46
46
47
ops :
47
48
taskfile : tools/taskfiles/taskfile_ops.yml
Original file line number Diff line number Diff line change @@ -403,3 +403,18 @@ tasks:
403
403
- echo "Next processes will be killed:"
404
404
- ps -ef | grep "ssh -f -N -L" | grep --invert-match "grep"
405
405
- pkill -f "ssh -f -N -L"
406
+
407
+ squash :
408
+ desc : Squash all commits made on CHILD_BRANCH relative to PARENT_BRANCH into single one (using git reset --soft)
409
+ vars :
410
+ REMOTE : ' {{.REMOTE | default "origin"}}'
411
+ requires :
412
+ vars :
413
+ - PARENT_BRANCH
414
+ - CHILD_BRANCH
415
+ cmds :
416
+ - git fetch {{.REMOTE}} -f {{.PARENT_BRANCH}}:{{.PARENT_BRANCH}}
417
+ - git switch {{.CHILD_BRANCH}}
418
+ - git fetch {{.REMOTE}} {{.CHILD_BRANCH}}
419
+ - git reset --soft $(git merge-base {{.PARENT_BRANCH}} HEAD)
420
+ - echo 'Now you can commit merged changes with "git commit -m "commit message"'
You can’t perform that action at this time.
0 commit comments