See git for a list of all commits that have passed between two commits (on branches)

I have two branches where commits are made independently, and I would like to run the Git command, which will show me all the commits that entered between a certain timeframe (expressed as hash-latches) regardless of the branch.

This is my test repo for demonstration purpose: https://github.com/jsniecikowski/testApp

If we presented the history of Git as a list (last one at the top):

  • 4332e0e on the release branch
  • 18bc14a on the release branch
  • 90f9149 on the main branch
  • 4f6e07f in the release branch
  • ca404cf in the release branch
  • 6cf47b3 in the release branch

then I would say: “Give me all the changes that have occurred between“ 90f9149 ”and“ 4332e0e. ”Ideally, I would get one commit: 18bc14a

, :

git log --full-index --no-abbrev --format=raw -M -m --raw 90f9149d2f7367738e9d6f4a53c2c325f96a9b5f..4332e0eb24e18119b10835e361915f1f5eff16bc

, .

git, - ?

+2
2

Gauthier , , , .

, :

git log Build-Release-Testing --since="$(git log -1 90f9149d2f7367738e9d6f4a53c2c325f96a9b5f --pretty=%ad)" --until="$(git log -1 4332e0eb24e18119b10835e361915f1f5eff16bc --pretty=%ad)"

, .

0

, , 18bc14a, , , master Release, Release, master. ?

:

git log -1 master --pretty=%ad

Release :

git log Release --since=<date>

:

git log Release --since="$(git log -1 master --pretty=%ad)"

4332e0e, ? , ^ Release.

+2

Source: https://habr.com/ru/post/1583843/


All Articles