We are working with the model of a single remote repository that all of us use. We branch for new features and reintegrate into a trunk branch. Our workflow is that we should integrate from trunk into our working branches when other features are integrated into the trunk.
As such, it's not uncommon for us to do:
(branch) $ git commit -a -m"blah blah blah"
(branch) $ git fetch # origin/trunk is updated
(branch) $ git checkout trunk
(trunk) $ git pull # trunk is fast-forwarded to current version of origin/trunk.
(trunk) $ git checkout branch
(branch) $ git merge trunk
(branch) $ git push
I don't like the "git checkout trunk/git pull/git checkout branch" cycle. It's usually combined with Visual Studio complaining that all my files and projects have changed on disk, and should it reload them. For both checkouts. And the pull. And the merge. The merge is unavoidable, but because of how git works, it should be able to do the fast-forward on trunk without actually needing to check it out.
But I don't know the command, and my google-foo has failed me on this. Anyone know how?