Skip to content

Commit 6ef6906

Browse files
committed
add a script for reformatting a stack of commits
1 parent 5d1b294 commit 6ef6906

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env sh
2+
3+
## This file reformats each commit in a branch using "git rebase".
4+
##
5+
## If you are are unsure, you can of course apply on a copy.
6+
##
7+
## Branch should be linear, i.e. free of merges.
8+
##
9+
## https://stackoverflow.com/questions/76945493/how-do-i-format-all-commits-in-a-branch
10+
11+
git rebase \
12+
--strategy-option=theirs \
13+
--exec 'gradle --parallel spotlessApply; git add --update; git commit --amend --no-edit' \
14+
$1

0 commit comments

Comments
 (0)