I am using git thread to manage branches in my repo as described in: http://nvie.com/posts/a-successful-git-branching-model/
Thus, the sequence of commands that I should use will be as follows:
git checkout mybranch git pull --rebase origin develop git checkout develop git merge --no-ff mybranch
However, there is one thing that I would like to do differently, in some cases:
I would like to save all my commits in my function branch ( mybranch ), but when merging (or crushing) they merge into one diff when merging into develop .
So, I think the sequence of commands should be:
git checkout mybranch git pull --rebase origin develop git checkout develop git merge --no-ff --squash mybranch
Will I really do something wrong if I need to combine --no-ff with --squash ?
I hesitate to try this because crush and save history are orthogonal requirements - see Twisting all my commits (including merges) into one commit without changing history
My consideration is that I want to keep history on one branch ( mybranch ) and suqash on another branch ( develop ) β, because these actions are performed on separate branches, this is normal.
source share