Inspecting Remote Logs
What
Since git fetch stores remote branches in a distinct namespace, you can query and review their commit history logs just like you do for local branches.
How
Specify the hierarchical remote name, formatted as <remote>/<branch>, in your git log command:
# General Syntax
git log <remote>/<branch>
# Example: Viewing the history of a remote feature branch named 'update_dune'
git log origin/update_dune --oneline
This will output the timeline of commits residing on that remote branch, even if you do not have a local branch representing that feature checkout on your system yet.
Why
Before incorporating changes made by coworkers into your clean codebase, you should always audit their commits. Reading the remote-tracking logs allows you to see their exact commit messages, verify which files were modified, and understand the scope of their contributions before merging them into your branch.
Summary
Query the history of remote branches by supplying the remote-tracking branch name git log <remote>/<branch> to inspect commits prior to merging.