summaryrefslogtreecommitdiff
path: root/bin/git-publish
blob: 001676466db18af24cb2325f0f5c0cc880d5367b (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash -e

# Copy your current branch to a "publishing" remote.
#
# By default, this remote is origin. However, you can set `publish.remote` to
# publish to another repository (eg. my-fork).

REMOTE="$(git config publish.remote || echo "origin")"

exec git push --force-with-lease "$@" "${REMOTE}" HEAD