git log not showing updated records

git

Solution

This should show all the commit from the various branches:

git log --all --branches

(you can see a more compact `git log` here)

A git fetch alone doesn't update the commit of your local branch, only of the one in the remote namespace (ie, the branch `origin/mainline`). To update your local '`experiment`' branch with a remote one you have fetch, add:

git checkout experiment
git merge origin/mainline

Then a simple `git log` will show you a new commit.

Problem

I have two branches "master" and "experiment", both locally and at a remote repo. They are both synced, i.e. the HEAD is the same commit, both locally and at remote. I make a commit to "master" locally and then push it to remote "master". I then decide that I'd like to have "experiment" at the current status as "master"(sync/merge with master, yet maintain it as a separate branch). So locally I move to the "experiment" branch and do :- git fetch origin mainline However, after doing the fetch, doing a "git log" in "experiment" does now show the new commits in them. Am I doing something wrong?

Original source

Related problems