Make (un)publish alias remote configurable

Add the `publish.remote` option to enable the remote to publish to
configurable rather than hard-coded in the alias.
This commit is contained in:
Kenneth Benzie 2022-12-15 11:50:46 +00:00
parent 753778c632
commit d5ae3dbfc8

4
config
View File

@ -31,8 +31,8 @@
delete = branch -D
refname = rev-parse --abbrev-ref HEAD
publish = !git push -u origin `git refname`
unpublish = !git push -u origin :`git refname`
publish = !git push -u `git config --get publish.remote || echo origin` `git refname`
unpublish = !git push -u `git config --get publish.remote || echo origin` :`git refname`
force = push --force-with-lease
changes = !sh -c 'git log --oneline $1..' --