Created
August 13, 2021 03:43
-
-
Save claruspeter/ab90f1503bb30312f9090a707b187a2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
# USAGE: in a repo folder in the terminal type `git <alias>`. e.g. `git branchname` | |
# The simple name of the current branch | |
branchname = "!git rev-parse --abbrev-ref HEAD" | |
# Publish the current branch to DEV | |
pubd = "!git push origin $(git branchname):dev --force" | |
# Publish the current branch to TEST | |
pubt = "!git push origin $(git branchname):test --force" | |
# Run this in DEV/TEST to see which branch was force pushed to it and who did it | |
pubsource = "!git for-each-ref --points-at $(git rev-parse HEAD) --format '%(refname:short)~~%(committername)~~%(committerdate:iso)' | grep 'origin/' | grep -v 'dev~\\|test~\\|prod~'" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment