Is there a way to check what git rebase
had changed after doing the rebase and exiting rebase mode?
I used rebase to change the author name of previous commits.
While trying to do so, I rebased in wrong branch (i.e., master
) which viewed to me in the rebase file some commits that were not my target. Therefore, I just quit the editor and it said "Rebase done successfully".
At the end, I switched to my local branch (i.e., vIO
) and I could change the author name but I want to check that my other rebasing trials didn't affect the history. BTW, my local branch (vIO
) is not yet pushed to remote.
I tried comparing local master to remote master by:
git diff origin/master...master
This didn't bring anything. Does this mean for sure that the master branch was not affected by the rebasing?
git
keeps a log for each separate branch, which you can access through thegit reflog
command :git reflog master
will show you the evolution of your localmaster
branch,git reflog vIO
the evolution of your localvIO
branch.In this reflog, actions that were applied by a rebase will appear with a message :
The
git diff origin/master...master
command told you that there was no new content on master, which is a good indication.If you want to be 100% sure
master
didn't move, look at the list of commits withgit log
:will allow you to see if there are any different commits the two branches :
master
andorigin/master
appear on the same commit, the two branches are in sync ;pull
,push
,merge
,rebase
...)