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 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 bin/git-publish (limited to 'bin/git-publish') 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 -- cgit v1.2.3