summaryrefslogtreecommitdiff
path: root/git-publish
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-04-23 11:39:38 -0400
committerBen Sima <ben@bsima.me>2021-04-23 11:39:38 -0400
commitc9ad53d4ab12cdf742a5f42d1e1bb6cf8946dd1c (patch)
treedde827d4174e32ca92dc671e53a405e0f23ce6da /git-publish
parenteef8ff71d1e72fdd4bece81a2237e3171464a2ef (diff)
add git-spinoff and git-publish
Diffstat (limited to 'git-publish')
-rwxr-xr-xgit-publish7
1 files changed, 7 insertions, 0 deletions
diff --git a/git-publish b/git-publish
new file mode 100755
index 0000000..29cb246
--- /dev/null
+++ b/git-publish
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+# send a specific commit on the current branch to the remote
+branch=$(git rev-parse --abbrev-ref HEAD)
+remote=$1
+commit=$2
+git push $remote $commit:$branch
+