简体   繁体   中英

Git log to show ALL the commit messages of the merged branch

I have a feature branch and a master branch where the feature branch has been merged into. I need to get the list of all commits that took place in the feature branch. To do so I do (master is checked out):

git log --since="2022-09-09T00:00+12:00" --until="2022-09-10T00:00+12:00" --date=iso-strict  --pretty=format:"%x7c%H%x7c%B%ad%x7c" --graph

What I get is

Merge in CON/ih-webserver from feature/IH-6452-add-parapet-backside-palette-part to master 
 
* commit '0db13700603e2faa0f0ec568d9677b5e16ddfb1f': (58 commits) 
  IH-6452 format 
  IH-6452 format 
  IH-6452 fix create room_type_surface based on franchise_type 
  IH-6452 rolling back changes 
  IH-6452 create room_type_surface based on franchise_type 
  IH-6452 fix room_type_surface query 
  IH-6452 fix column name 
  IH-6452 remove unrequired Min function 
  IH-6452 remove unrequired Min function 
  IH-6452 format 
  IH-6452 remove unused kitset 
  IH-6452 take bom_category and bom_sub_category id from query 
  IH-6452 use existing part 
  IH-6452 update supply_unit query 
  IH-6452 add temp part name identifier 
  IH-6452 add comments 
  IH-6452 fixing uref in insert part query 
  IH-6452 revert test case wrong value 
  IH-6452 add filtering by part uref 
  IH-6452 add pending bug ticket todo comments 
  ...

As you can see the list contains 20 latest commits only, however there are 58 of them, the earliest ones are behind this "...". My question is, is it possible to get the full list of the commits in the feature branch?

Note : the branch is being deleted after it gets merged into master, so there is no way to do git log feature_branch

Assuming this was a real merge (and not a squash-merge which only puts the old commit messages as text into the merge commit message):

git log ^mergecommit^1 mergecommit^2
  • ^mergecommit^1 means --not mergecommit^1 , ie exclude all commits reachable from the first parent of the merge commit (generally your main line of development)
  • mergecommit^2 includes all commits reachable from the second parent of the merge commit (usually your feature branch)

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM