When I work on two different features (on two different branches created from the master) it is quite annoying that I will not have the commit history when I proceed with merging.
I'll explain better. When I finish work on Branch-A, I merge it into master. And that's fine, if I git log
I see all the commits I made on Branch-A.
Instead, when I finish work on Branch-B and I try to merge it to master (after that Branch-A has been already merged), I have to specify a commit message for the merging (while for the first branch I have not been asked anything).
And after the merging to master, if I type git log
, I cannot see the commits of the Branch-B in the history of my master branch
Let's say I have
**Branch A**
commit 09b2unfas9d781n2e
Add more stuff
commit 8uj8masd89jas898a
Add stuff
**Branch B**
commit 09b2unfas9d781n2e
Add feature setting
commit 8uj8masd89jas898a
Add feature
I finish having
**Master**
commit 6hf6h8hd871udjkdn
Merge: 09b2un 34osd6
Merge branch 'Branch-B' into master
commit 09b2unfas9d781n2e
Add more stuff
commit 8uj8masd89jas898a
Add stuff
commit 34osd62dhc91123j8
I'm a previous commit from 'master'.
The last one before branching...
while I would like to obtain something like:
**Master**
commit 09b2unfas9d781n2e
Add feature setting
commit 8uj8masd89jas898a
Add feature
commit 09b2unfas9d781n2e
Add more stuff
commit 8uj8masd89jas898a
Add stuff
commit 34osd62dhc91123j8
I'm a previous commit from 'master'.
The last one before branching...
... that would reflect more exactly the history of the performed commits.
I don't get why I can keep the history from just one of the two branches.
How can I keep everything clear without those merge commits that hide/omit the real history of the merged commits?