Created
November 17, 2025 00:53
-
-
Save orgmir/7113288e84893ece2fbf7bd9cd760f02 to your computer and use it in GitHub Desktop.
Git 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
| alias.force-push=push --force-with-lease | |
| alias.local-prune=!git fetch --prune && git prune origin | |
| alias.branch-delete-remote=!git branch -r --merged origin/main | grep -v 'origin/main$' | xargs git branch -d | |
| alias.branch-delete-local=!git branch --merged origin/main | grep -v 'main$' | xargs git branch -d | |
| alias.sync=!git checkout main && git pull && git local-prune && git branch-delete-remote && git branch-delete-local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment