I do not know any Magit-specific setting, but you can just configure git
itself accordingly:
git config --global pull.rebase true
I'd strictly advise against on enabling this setting globally.
As I have said in my comment, you should really change your development process so that there is no need for merging/rebasing on git pull
. Don't work on shared branches, but instead always create your own feature branches for your work, and explicitly merge when needed.
You can then explicitly configure individual shared branches in your repository for rebasing, e.g.
git config --local branch.my-fancy-feature.rebase true
As for the hook, there is no specific hook for git pull
. However, there is no harm in updating the tags file on other changes to the tree as well, so you may just the post-rewrite
(for git rebase
) and post-merge
(for git merge
) hooks.
See Tim Pope's post Effortless Ctags with Git for details on such a setup.