I use git for a few months now.
I have a bare repository on a server, and I work with it from 2 locations.
I’ve noticed that when I do some local commits on one of the computers, push them on the server, and pull and merge them on the second location, I only get one new commit in the history.
If I’ve understood correctly, this is the way merge works, and if I want the same histories between the two computers, I should use rebase, am I correct?
But the first question I wondered is: even if I don’t have all the commits history on both computers, does the bare repository have it at least?
If yes, is it possible to consult the log on the remote server?
Thanks in advance
Mike
No history was lost.
The merge commits have 2 parent commits, the preceding local commit (which is what
git logis showing you), and the remote commit that it was merged with. You can usegitkto visualize this.Both systems, and the server, share identical history.