When fetching and rebasing the master/main/develop branch, you might use up to four git commands. Here my Top-Down list, starting with the most annoying:
๐๐ฝ 4 commands
which can't be put in an alias without a parameter
git checkout master
git fetch
git checkout feature/My-Nice-Feature-XYZ
git rebase master
๐๐ฝ 4 commands
git checkout master
git fetch
git checkout - # changing back to the last branch
git rebase master
๐๐ฝ 2 commands
git fetch origin master:master
git rebase master
# or
git fetch origin master:master && git rebase master
๐๐ฝ 2 commands
git fetch
git rebase origin/master
# or
git fetch && git rebase origin/master
๐ฆ 1 command
after creating an alias
git config --global alias.rma "!git fetch && git rebase origin/master"
git rma
Are there better ways to fetch and rebase master? Or even worse solutions?๐ Let me know in the comments