git log Why do two machines display logs that are not exactly the same?
ringa_lee
ringa_lee 2017-05-02 09:44:10
0
1
688

Use the following git command to display commit history:

git log -20 --pretty="%h - %an %s"

Operate on the server and the local machine, the same warehouse, and they are all the latest code. The logs seen on both sides are not exactly the same. The left picture is the server and the right picture is the local machine. You can see the left picture on the server. The extra log records are all about publish Merge and the like. What's going on?

ringa_lee
ringa_lee

ringa_lee

reply all(1)
为情所困

The repository on the left has some commits on the master branch, but the one on the right does not. That is, those commits only exist in the left repository and do not exist in the remote repository.

You can tell this from the difference in the latest submission.

It is also recommended that you add the --graph option to view branches easily.

git pull = git fetch + git merge, which means it will perform a merge operation. What is available remotely must also be available locally; What is available locally may not be available remotely.

I am used to using it like this:

>>> git tree --help
`git tree' 是 `log --graph --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %Cgreen%an%Creset: %s %Cblue(%ad)%Creset'' 的别名
>>> git xtree --help
`git xtree' 是 `log --graph --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %Cgreen%an%Creset: %s %Cblue(%ar)%Creset'' 的别名
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template