I have an application which is currently used by clients. So based on the feedback from the client, normally we are fixing bugs in a live application.Parallel I am adding new modules to demo projects.My plan is to migrate the new modules into live after testing.

But the issue is we have fixed many bugs in live version for old modules.So that when I am trying for migration between demo and live,there is a conflict,chance for loosing code.

Technology:-.Net Framework MVC , Agile Methodology, Team Foundation Server

  • 1
    It's not clear what you are asking. – DFord Feb 7 '19 at 15:07

It sounds like you need branches to separate the development of new modules (demo) from the bugfixes on the live environment. You can then have the version control merge the changes. Depending on how much code was changed in both branches, it will be able to merge some of the changes automatically and some changes will 'conflict', meaning that the automatic merge cannot determine what the final code should be. You'll have to resolve those manually, either by a developer who is experienced with that part of the application or by all developers who contributed to the changes resulting in the conflicts. Then, even if there are no conflicts, test the final codebase on a separate environment (ideally a copy of the live environment, but the demo environment might work as well). Automatic merge isn't always flawless and you might have introduced additional dependencies in one branch, such as a parameter not being null, which aren't satisfied in the other branch.

If you have committed the changes in each branch, you won't lose code; if code disappear during the merge, you can always checkout a previous commit, copy the 'lost' code to somewhere outside the project, checkout the latest commit, and copy the code back in the project.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.