[en] This paper presents a formal approach for managing unanticipated software evolution. Labelled typed nested graphs are used to represent arbitrarily complex software artifacts, and conditional graph rewriting is used for managing evolution of these artifacts. More specifically, we detect structural and behavioural inconsistencies when merging parallel evolutions of the same software artifact. The approach is domain-independent, in the sense that it can be customised to many different domains, such as software architectures, UML analysis and design models, and software code.