Back in Feb, I posted a quick tip about expediting the process of pulling the latest from develop and merging into your current branch. https://jwopitz.wordpress.com/2023/02/24/quick-git-merge-rebase/
Usually I just do this from origin’s develop branch, so why should I have to type it every time? I shouldn’t. So I made a git alias to make this even easier:
git fmerge
I could also specify a different branch (it defaults to develop):
git fmerge another-branch
… or you can even specify another origin (though I have never done this)
git fmerge another-branch another-origin
Here is the alias you can add to your ~/.gitconfig
file:
[alias]
fmerge = "!f() { \
branch=${1:-develop}; \
shift; \
remote=${1:-origin}; \
git fetch $remote $branch:$branch && git merge $branch; \
}; f"