Sanchayan Maity
c190b10e31
git merge master/main is a frequent enough operation. Automatically detect whether the primary branch is master or main and merge.
9 lines
211 B
Fish
9 lines
211 B
Fish
function gm
|
|
if count $argv >/dev/null
|
|
git merge $argv
|
|
else
|
|
set -l remote (git symbolic-ref refs/remotes/origin/HEAD | awk -F'/' '{print $4}')
|
|
git merge origin/$remote
|
|
end
|
|
end
|