Skip to content

Instantly share code, notes, and snippets.

@himaprasoon
Last active July 30, 2025 13:15
Show Gist options
  • Save himaprasoon/379b70f1c21194d2e9071dc9b2194eca to your computer and use it in GitHub Desktop.
Save himaprasoon/379b70f1c21194d2e9071dc9b2194eca to your computer and use it in GitHub Desktop.
Git aliases on mac
# resync -> hard reset a branch to origin
git config --global alias.resync '!git fetch origin && git reset --hard origin/$(git rev-parse --abbrev-ref HEAD)'
#rebmain -> Fetches origin and rebase main
git config --global alias.rebmain '!git fetch origin && git rebase origin/main'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment