Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ferranpujolcamins/6b902e9415c416d2cdae7b6f60b8d5c5 to your computer and use it in GitHub Desktop.
Save ferranpujolcamins/6b902e9415c416d2cdae7b6f60b8d5c5 to your computer and use it in GitHub Desktop.
git sync
# git alias to reset --hard the current branch to it's remote tracking branch
git config --add alias.sync '!git reset --hard "$(git rev-parse --abbrev-ref --symbolic-full-name @{u})"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment