Created
June 26, 2025 10:55
-
-
Save RickCardoso/c791a1332e89e0f8ceb51affa134f44c to your computer and use it in GitHub Desktop.
GitHub CLI aliases
This file contains hidden or 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
gh alias set nb --shell 'git checkout -b $1' | |
# gh nb chore/branch-name -> creates a local branch named chore/branch-name | |
gh alias set fix --shell 'gh nb fix/$1' | |
# gh fix component-tests -> creates a local branch named fix/component-tests | |
gh alias set feat --shell 'gh nb feature/$1' | |
# gh feat new-component -> creates a local branch named feature/new-component | |
gh alias set pu --shell 'git push --set-upstream origin $(git branch --show-current)' | |
# gh pu -> pushes the local branch to remote with the current branch name | |
gh alias set p --shell 'git push' | |
# gh p -> pushes the local branch to a defined origin branch | |
gh alias set mh --shell 'git checkout $1 && git pull && git checkout - && git merge $1' | |
# gh mh main -> checks out main, pulls from origin, go back to previous branch and merge main to it | |
gh alias set ic --shell 'git commit -m "$1" --allow-empty' | |
# gh ic 'feat: ✨ create new button' -> adds an empty commit with the pretty message "feat: ✨ create new button" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment