I am the maintainer for a project in Git. Sometimes new contributors send patches which are based on an older commit because they forgot to pull the latest changes and rebase to Git master before submitting. I can do this for them, but it takes many steps. How can I do this in one step?
How I do it in multiple steps:
git checkout -b feat/some-patch <commit id of commit he based his patch on>
git pull <his patch> # applies via fast-forward
git rebase master # do what he should have done
git checkout master
git merge feat/some-patch # applies via fast forward
This works, and I avoid merge commits. I wish there was a one liner to do so. I looked at git pull --rebase, but it doesn't do what I expected.