KrisK Posted May 27, 2018 Report Share Posted May 27, 2018 Is there a way to revert a file to a certain previous state without loosing part of the files history? Let's start with a qualitative description of what we want to do : We've made some number of commits, five of which changed a given file, and we want to revert the file to one of the previous versions without. Unfortunately revert to this revision from the history seems to remove the history beyond the revert revision. Also subtractive merging seems only work on a changeset level and not a file level. Link to comment Share on other sites More sharing options...
manu Posted May 28, 2018 Report Share Posted May 28, 2018 Hello @KrisK, the "revert" operation will not remove the history beyond the selected revision, history remains as it is, you are just changing the "head" revision of the file but if you check the file history after the revert you will see that the rest of revisions are still there. From your statement: 15 hours ago, KrisK said: We've made some number of commits, five of which changed a given file, and we want to revert the file to one of the previous versions without. I think the revert operation is what you need, let me know if I'm missing something. Best, Manu. Link to comment Share on other sites More sharing options...
KrisK Posted May 28, 2018 Author Report Share Posted May 28, 2018 Ah ok sorry I misinterpreted the output. Thanks for the quick response Link to comment Share on other sites More sharing options...
manu Posted May 28, 2018 Report Share Posted May 28, 2018 No problem You are very welcome. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.