diff --git a/.gitconfig b/.gitconfig index bfb5ac9..e03c478 100644 --- a/.gitconfig +++ b/.gitconfig @@ -85,6 +85,9 @@ undo = !git reset HEAD~1 --mixed undo-amended = !git reset --soft HEAD@{1} top = !git log --format=format:%an | sort | uniq -c | sort -r | head -n 20 +# Fetches all the remotes and resets the current local branch to its upstream +reset-branch = !git fetch --all && git reset --hard @{u} + # from trevor bramble https://twitter.com/TrevorBramble/status/774292970681937920 alias=!git config -l | grep ^alias | cut -c 7- | sort