I think the easiest way to avoid the git checkout trunk
, git pull
, git checkout branch
cycle is to use this answer:
git fetch upstream trunk:trunk
This does exactly what you want – fast-forward your local branch trunk
to the remote branch’s HEAD.