commit 17b274df8d8eeadce75c410fe17defb318d383f7 parent b27854f1c3545cde6af4c659c248663d18eab94a Author: Sebastian <sebasjm@gmail.com> Date: Thu, 2 Dec 2021 15:23:58 -0300 add formatting splitter Diffstat:
| A | contrib/split-formatting-vs-content-in-commit.sh | | | 10 | ++++++++++ |
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/contrib/split-formatting-vs-content-in-commit.sh b/contrib/split-formatting-vs-content-in-commit.sh @@ -0,0 +1,10 @@ +FILES=$(git status --short --untracked-files=no --porcelain | colrm 1 3) +git stash +pnpx prettier $FILES -w +git add $FILES +git commit -S -m '-formatted with prettier' +git stash pop +git checkout --theirs -- $FILES +git add $FILES +git commit -S +