From fc58f4d328281e504ca3cf4b2ff96a0242154e20 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 17 Jun 2020 17:32:49 -0400 Subject: Move publish and wip to scripts. This makes them a bit more practical to add more sophistication to. `git-publish` in particular can now do more. --- bin/git-publish | 10 ++++++++++ bin/git-wip | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100755 bin/git-publish create mode 100755 bin/git-wip (limited to 'bin') diff --git a/bin/git-publish b/bin/git-publish new file mode 100755 index 0000000..c545825 --- /dev/null +++ b/bin/git-publish @@ -0,0 +1,10 @@ +#!/bin/bash -e + +# Copy your current branch to a "publishing" remote. +# +# By default, this remote is the remote matching your local username. However, +# you can set `publish.remote` to publish to another repository (eg. origin). + +REMOTE="$(git config publish.remote || echo "${USER}")" + +exec git push --force-with-lease "$@" "${REMOTE}" HEAD diff --git a/bin/git-wip b/bin/git-wip new file mode 100755 index 0000000..6a739a8 --- /dev/null +++ b/bin/git-wip @@ -0,0 +1,6 @@ +#!/bin/bash -e + +# Create a meaningless commit with a unique message: `git wip`. + +git this +git commit -m "wip: $(uuidgen)" -- cgit v1.2.3