Skip to content

Commit 26f2b66

Browse files
committed
feat: configure git reset-branch alias
1 parent d9f2f79 commit 26f2b66

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.gitconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ undo = !git reset HEAD~1 --mixed
8585
undo-amended = !git reset --soft HEAD@{1}
8686
top = !git log --format=format:%an | sort | uniq -c | sort -r | head -n 20
8787

88+
# Fetches all the remotes and resets the current local branch to its upstream
89+
reset-branch = !git fetch --all && git reset --hard @{u}
90+
8891
# from trevor bramble https://twitter.com/TrevorBramble/status/774292970681937920
8992
alias=!git config -l | grep ^alias | cut -c 7- | sort
9093

0 commit comments

Comments
 (0)