summaryrefslogtreecommitdiffstats
path: root/unwip
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2020-08-18 09:51:01 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2020-08-18 09:51:01 +0200
commit76f5615e74643260747d981f44c98a0076da5adc (patch)
treecad24a0fbb7cc57ccbc712c50748bd3281634c18 /unwip
parentb33c4623ed06dfa2e8c418e5fa74fce68044b179 (diff)
downloadbin-76f5615e74643260747d981f44c98a0076da5adc.zip
bin-76f5615e74643260747d981f44c98a0076da5adc.tar.gz
add [un]wip
Diffstat (limited to 'unwip')
-rwxr-xr-xunwip17
1 files changed, 17 insertions, 0 deletions
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
+