Merge-conflicts Automation

2019-08-24 05:06发布

问题:

Using CI/CD approach, one of the principle mentioned, here:

Automate wherever possible

Merging can be done two ways, based on the scenario:

1) Fast-forward merge

2) 3-way merge


Does it make sense to think about automating merge conflicts?

回答1:

No. A merge conflict is literally the end result of a failure to automate.

Remember: Git is doing its best to ensure that it doesn't lose any data, and a merge conflict is Git telling you in its standard, paranoid fashion that it could lose data and it wants you to intervene.

Automating wherever possible is the right mentality. Merge conflicts are very risky to automate, which would preclude the possibility of automating it at all.