When I am working with notebooks, I tend to make small, incremental changes which I test and save with an incrementing file name. For example, my first effort is Notebook1 which I test and, if working, save as Notebook1 and as Notebook2. I now work on Notebook2 ... you get the picture.
From time to time I need to compare one notebook with an earlier version. I have available two software packages, Code Compare and Beyond Compare, but to use them I really need to be able to convert or export the contents of the notebooks as text. I am only really interested in the code/input sections of the notebooks.