Home > Mobile >  Is it possible to find out when a change was originally committed after its branch was rebased?
Is it possible to find out when a change was originally committed after its branch was rebased?

Time:10-07

I have two branches, master and feature. I'm working and committing to feature, while others are merging to master. I'm rebasing feature onto master daily to avoid potentially horrendous conflicts in the future when I go to merge into master. What I'm curious about, is whether it's possible for me to see when each of my commits was originally made (on feature).

CodePudding user response:

git log by default shows Author Date, which is the time when the commit was originally made. Commit Date is the one that changes when you rebase.

CodePudding user response:

You can say

git show --format=fuller <mycommitSHA>

CodePudding user response:

If you rebase changes of master to feature branch (git rebase master) the commit history is rewritten. However, if you create a temp branch before rebasing then that branch will keep the history.

For ex: git checkout feature

git checkout -b tempfeature

git checkout feature

git rebase master

git checkout tempfeature

git log --oneline

tempfeature branch should keep your previous history

  •  Tags:  
  • git
  • Related