3 ms·
If you are using topic branches, it's bad practice to merge from upstream when it is not necessary [1,2,3], because you clutter your branch with new features th
by jedbrown 13y ago
If you are using topic branches, it's bad practice to merge from upstream when it is not necessary [1,2,3], because you clutter your branch with new features that are mostly unrelated to what you are trying to accomplish. Consider merging the specific topic branch that you need rather than 'master'. Alternatively, if nothing depends on your branch yet, you can rebase onto 'master', though this may invalidate earlier testing.
Now to your specific question (fast-forward a local branch without checking it out), you can
git fetch origin master:master
or
git push . origin/master:master
Then you can merge 'master' instead of 'origin/master', thus eliminating the remote URL or "remote-tracking" language from the prepared commit message.
[1] http://gitster.livejournal.com/42247.html http://gitster.livejournal.com/42247.html
[2] http://lwn.net/Articles/328436/ http://lwn.net/Articles/328436/
[3] http://yarchive.net/comp/linux/git_merges_from_upstream.html http://yarchive.net/comp/linux/git_merges_from_upstream.html
- lmm 13y agoYour posts seem to be arguing that you shouldn't be merging branches that are full of experimental crap into your topic branch, you should only merge releases - which I agree with (where I work we use the github-flow where the master branch tracks the release version).