0

Lets Suppose the git log has the following commits

commit15
commit14
commit13
commit12
commit11
commit10
.
.
.
commit1

I tried saving the git log till commit 14 to a file by

git log --pretty=format:'%h|%H|%an|%ai|%s' $commitid | grep -v "Merge branch 'master' of" > 'path to log file which should contain git log till that Commitid'

This is working fine except for one case,i.e.

When commit12 and commit13 were pushed after pulling with git pull --rebase,when i try to save the git log till commit14 using git log commit14 i cant see the commits12 and commits13 but when i try to log till commit15 using git log commit15 the commits 12 and 13 are listed under commit14

I understand the problem is with --rebase,Is there any way i can log the commits till a particular id even it has commits below it which have been rebased onto the top of it? (I saw the git repo, commit12 and commit13 are listed under commit14)

sarat
  • 185
  • 9

0 Answers0