I'm using GitFlow in my git repository, so I have a master
, develop
and (temporary) release
branch.
Workflow
- I create a new branch from
develop
(e.g.fix/fix-the-bug
) - I squash my fix into meaningful commits
- I merge my
fix/fix-the-bug
branch intodevelop
- Once I've got enough branches merged, I create a (temporary)
release/x.y.z
branch fromdevelop
- I version-bump my scripts in the
release/x.y.z
branch and tag that commit - When I want to merge
release/x.y.z
intomaster
, I get merge conflicts. It seems likemaster
does not understand that commits are already present inmaster
release/x.y.z
branch gets merged intodevelop
- I delete
release/x.y.z
Few things to notice, not sure if they are all correct:
- I squash my commits into one commit when merging into master
- There should be a git tag on
master
indicating the version number, but not sure if that would work correctly if I squash the commits.
Question
I'm now wondering:
- how I can fix my repo, since I don't think I should be getting those conflicts.
- Any further advice on the workflow (e.g. in which part I could perform the squash best) would be welcome.
master
will also contain the complete history as present indevelop
, but should be viewed with the--first-parent
option? 2) I should leave the git-tag with the version number on the "version-bump" commit? – Rewrite