I don't know why git works like this but when I merge branch A into branch B and then use git log on branch B , all I see are the logs of all my commits from branch A . I thought I would see the list of commits and on top of those commits it would say "Merged a into B" .
I know I have seen in my log files "Merge branch 'a' into branch 'b'" when I worked on other projects so I don't know what I am doing wrong. What I am doing is completing a branch so I know it works. Checking out development and then merging the last branch I worked on into development. Any idea what I'm doing wrong?
Git defaults to fast-forward merge option when there are no commits in branch B .
You have to use --no-ff
switch to always create merge commit.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.