-3

I am trying to get the list of all commit ids after/since a certain commit id, is there a git command..?

git log --pretty=format:"%H" --since=2014-05-04 would print all the commit-ids since 2014-05-04, similarly is there a command that could print all the commit ids after a certain commit-id?

Example:

123456daskkl9

56787skjskdk8

adkasjdka6788

dkajsdklja76678

jkajskldal677889

If I try "git log --pretty=format:"%H" adkasjdka6788"

The out put is

adkasjdka6788

dkajsdklja76678

jkajskldal677889

Instead, what I am looking for is a command that would get the below output

123456daskkl9

56787skjskdk8

user3660827
  • 75
  • 1
  • 5

1 Answers1

0

You can specify the commit range with the <since>..<until> syntax. If until is omitted, it will default to HEAD.

So, to get all the commits from hash adkasjdka6788 to the current HEAD of the branch you're on:

git log --pretty=format:"%H" adkasjdka6788..
Mureinik
  • 297,002
  • 52
  • 306
  • 350