How can you prevent or detect a merge that changes non-conflict files in git? -


We are using a very simple git workflow where there is the most active development on the same branch. As a result, when developers do a git pull , usually a merge commute is caused. Last week, twice a week we made a bridge to novice GIT users, which resulted in a merge collision, and then they all Removed files, on which they did not work individually and were merged. Clearly, any change that has been made as a result of the merger in the removal of a commission made by other developers.

How can you tell that a merge commute was modified in a way that matches the parent for the file without conflict? (Essentially I want to know if there is any good way to know whether "bad" merge or not.)

Is there a systematic way to keep it from happening again?

To answer your question directly, this command

  Git diff-tree -r --diff-filter = D - only -mate $ $ $ parent  

will list all the files which $ CHILD commit by If you run all the parents of a merge commute again and check that order, and they all show an annihilation, then you will know that the file was deleted in the merge, but Any merge overdue Not in father-father

He said, it seems like a big problem with your developers and your source control that this is a very specific solution. For a little better solution, give your developers the git pull --rebase or git fetch & amp; Consider using amp; GIT Rebase . I think merge works hard to follow itself, and it seems like your developers do too. If you want you can completely ban the merge.

For best solutions, good test coverage, if your developers are removed random files, then it should break the test.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -