Git merge squash repeatedly

Starting with X stable / a—b—c—d—e—f—g development You can use the following steps to copy the last commit from your development branch to your stable branch: git checkout development@{0} # get working tree from “development”, detach HEAD git reset –soft stable # reposition detached HEAD on “stable” git commit # enter the appropriate commit message … Read more

Git and working on multiple branches

There are two solutions not mentioned already that you can use: use a topic branch or use cherry-picking. Topic branch solution In the topic branch solution, you switch to branch ‘something’, create a branch to fix a bug e.g. ‘something-bugfix’, merge this branch into ‘something’ (fixing the bug), then merge this branch into ‘experimental’. $ … Read more