You can use git fetch
and merge remote changes to your branch with git merge origin/master
.
That alias works in bash
, so you probably wanna port it to a fish
:
[alias]
remaster = "!f() { git stash && git fetch origin && git merge origin/master && git stash apply; }; f"
But anyway, current branch name could be retrieved via git rev-parse --abbrev-ref HEAD
.