I'm new to git workflow and was following a tutorial online about "git fetch". Here are the performed steps:
For the tutorial --> After "git fetch" when "git log" is used to view commit history, it shows the last performed commit and who did it
For me --> After "git fetch" when "git log" is used, it doesn't show me the last performed commit
I tried "git pull" and then both commit history and local file got updated. Am I doing something wrong here (or) "git fetch" isn't supposed to update the log history
Yes, you have synchronized data with remote, but not change your head commit, so if you want to check remote commit log you should use git log origin/master
where origin
is remote name and master
is name of branch that you want to show.
If you want change yours commit to the latest from remote you should use git pull
instead git fetch
.