Five advanced Git merge techniques
blog.ezyang.com
blog.ezyang.com
In fact, you can make it the default! Just do: `git config --global branch.autosetuprebase always` and every branch you create from now on will be set up to rebase without needing the manual `--rebase`.
Existing branches you can switch by doing: `git config branch.[branch-name].rebase true` in the repo.
The only one that I know if is the message stating that the commit is empty ...
In that case simple use git rebase --skip, to skip applying that patch. That tends to happen when after you fix the "merge" conflict after replaying a patch and the changeset is empty.
Soon I will have to do a pretty big merge, with so many conflicts expected that I don't know if I can resolve them in one day. So usually when I have such a non-minimal task, I create a branch for it. Is there any sensible way to do a merge in a branch, and resolve the conflicts on a file-by-file base, with separate commits for each one?
Or maybe some other way to break down many merge conflicts into several small pieces?
(We have a heavily patched version of an open source project at $work, and whenever there is a new upstream release, merging is a huge pain. We do try to contribute some of our changes back to upstream, but many changes are simply too specific to go upstream).
http://notes.envato.com/developers/rebasing-merge-commits-in...
http://git-scm.com/2010/03/08/rerere.html
https://www.kernel.org/pub/software/scm/git/docs/git-rerere....
When working on a repository where you make a pull request from a feature branch to master in the same repos (typically : your company private repos), I would rather merge the feature branch in master rather than rebasing it, at least to know at which point a dev work has been merged.
The same logic stand, though. If developer has used several branches to build her feature, I don't want to know about it : she must rebase them instead of merging them.
Additionally, I like pull requests to master branch to be in a single, well documented commit. So I encourage developers to make a lot of small commits, then use `git rebase -i` to squash them into a single commit with a long and detailed commit message (the one-line previous commit messages being used to write a changelog). Using github, this has the advantage that the commit message of a single commit pull request is automatically pre-filled as pull request message.