I sometimes use the following workflow, which might suit you:
- I work in my own repo on a local feature branch (that is not pushed).
- I pull changes to master frequently.
- Every now and then I rebase my feature branch on master. If I feel like it, I do it interactively and fix up the history.
- When the feature is finished, I do a final rebase, and then I merge to master with
--no-ff
to force a merge commit.
The end result is a history that contains a merge commit, is easy to follow, but still clearly demonstrates that logically separate work has been done in a branch.
|
|
* merge commit
|\
| \
| *
| |
| *
| |
| *
| /
|/
* common ancestor
|
|
You also get a single merge commit that can be used to git revert
the whole feature if you wish.