Git Rebase History

Introduction

Git is one of the most widely used software development tool. However, I feel I have always been a noob for Git, even though I have been using it daily. Recently, I would like to know some details of my Git rebase history, such as when my specific development branch had been rebased, and it took me a while to figure out.

In this blog post, I would like to quickly document the command for showing the details of Git rebase histories.

Git Reflog

git reflog is the Git command to find out the Git rebase histories. For example, in the following Git rebase histories, we rebased the branch add_reading (cdced8c) onto the branch main (cf32bd0) on 2021-12-18 22:35:49.

1
2
3
4
$ git reflog show --date=iso | grep rebase
cdced8c HEAD@{2021-12-18 22:35:49 -0800}: rebase finished: returning to refs/heads/add_reading
cdced8c HEAD@{2021-12-18 22:35:48 -0800}: rebase: Add Readings
cf32bd0 HEAD@{2021-12-18 22:35:49 -0800}: rebase: checkout main
Author

Lei Mao

Posted on

03-16-2022

Updated on

03-16-2022

Licensed under


Comments