Skip to content

Instantly share code, notes, and snippets.

@kuboon
Last active September 9, 2022 08:04
Show Gist options
  • Save kuboon/e9b2d068c77da6b8aa85486094fd39d5 to your computer and use it in GitHub Desktop.
Save kuboon/e9b2d068c77da6b8aa85486094fd39d5 to your computer and use it in GitHub Desktop.
git alias
[alias]
begin = "!f(){ c=`git branch --show-current`; git switch -c $1; git commit --allow-empty -m \"$2\"; git push --set-upstream origin $1; gh pr create -a @me -b \"\" --draft --base $c -t \"$2\"; }; f"
pushtag = "!f(){ git tag -a -f $1 -m \"$2\"; git push -f origin $1 ; }; f"
sync = "fetch --prune --tags -f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment