Why is Git ignoring commits when merging? -


we have made changes 1 file in 2 branches. here file commit history on branch a: enter image description here

and here commit history of same file on branch b: enter image description here

now when merge branch branch b, end exact same commit history branch a. commit 56dfe991 has gone missing: enter image description here

obviously, disturbing. since don't know causing this. have idea?

there no such thing "file commit history" in git. there's history, , files.

the history considered @ git repository granularity, i.e. each commit has set of parents. see when run git log, or more visual output git log --graph --oneline --decorate.

now, can ask git filter history on per-file basis, e.g. git log -- file. hides commits not touch file, but history simplifications hide commits not contribute file history. documented in details in "history simplification" section of git log's documentation.

essentially, when reaching merge commit, if 1 of parent of merge commit not introduce change file, parent ignored.

as result, example, git log , git log . @ root of project may show different histories.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -