Thursday, October 8, 2020

Merge code from Dev to Main branch

Steps to merge code from Dev to Main branch:

1.Create and map workspace for Main branch

a. Create a folder in K: drive 





b. Create new workspace in VS for Main branch








c. Map the newly created workspace to the folder








2. Merge code to Main branch:

a. Select the Dev workspace and Get latest version for Dev branch






b. Select the newly created workspace for Main branch and Get latest version for Main branch






c. List down the change set numbers which needs to be merged for the Jira either from Azure DevOps or  from Visual studio (From Team>Go to work item).

d. Right click on the DEV branch >Branching and Merging>Merge










e. Select option "Selected changesets" and click on Next.












f. Select the change set to merge and click on Next and Finish.

(if there are any conflicts, then system will ask to merge. Select "Merge changes in Merge tool" option. System will show the differences. Select the check box beside the change which you want to keep. Once you select the required changes to merge click on "Accept Merge".)

g. Go to Team Explorer>Pending Changes> Select the Main branch workspace as below.













h. Check in by providing work item and comments.













i. Repeat the steps d to h for remaining change sets. Once you are done with the merge change back the workspace to DEV to continue with development.

That's All..

No comments:

Post a Comment