summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/git-publish10
-rwxr-xr-xbin/git-wip6
2 files changed, 16 insertions, 0 deletions
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)"