diff --git a/Custom-Commands-Compendium.md b/Custom-Commands-Compendium.md index ae3e2e5..083f956 100644 --- a/Custom-Commands-Compendium.md +++ b/Custom-Commands-Compendium.md @@ -12,6 +12,29 @@ customCommands: loadingText: 'pushing' ``` +## Pushing to a specific remote repository + +This custom command allows picking between already used remote repositories and pushing with force and/or with lease. +```yml + - key: '' + description: "Push to a specific remote repository" + context: 'global' + loadingText: 'Pushing ...' + prompts: + - type: 'menuFromCommand' + title: 'Which remote repository to push to?' + command: bash -c "git remote --verbose | grep '/.* (push)'" + filter: '(?P.*)\s+(?P.*) \(push\)' + valueFormat: '{{ .remote }}' + labelFormat: '{{ .remote | bold | cyan }} {{ .url }}' + - type: 'menu' + title: 'How to push?' + options: + - value: 'push' + - value: 'push --force-with-lease' + - value: 'push --force' +``` + ## Pushing to a specific remote branch ```yml @@ -24,6 +47,7 @@ customCommands: title: 'which branch do you want to push to?' command: "git push origin {{index .PromptResponses 0}}" ``` + ## Creating an annotated tag ```yml