From 76f5615e74643260747d981f44c98a0076da5adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 18 Aug 2020 09:51:01 +0200 Subject: add [un]wip --- unwip | 17 +++++++++++++++++ wip | 1 + 2 files changed, 18 insertions(+) create mode 100755 unwip create mode 120000 wip diff --git a/unwip b/unwip new file mode 100755 index 0000000..18d8802 --- /dev/null +++ b/unwip @@ -0,0 +1,17 @@ +#! /bin/sh + +cmd=${0##*/} + +if "$cmd" == "wip" + git add . && git commit -m WIP && git push --force +then +elif "$cmd" == "unwip" + while [ $(git log --format="%s" HEAD~1..) == "WIP" ] + do + git reset --hard HEAD~1 + done + git pull && git reset --soft HEAD~1 && git reset && git status +else + echo "unknown cmd '$cmd'" && exit 1 +fi + diff --git a/wip b/wip new file mode 120000 index 0000000..a1c3498 --- /dev/null +++ b/wip @@ -0,0 +1 @@ +unwip \ No newline at end of file -- cgit v1.1-2-g2b99