LogoLogo
  • Overview
    • Introduction
      • Git-Based Source Control
      • DeviceLink
    • System Requirements
    • Supported Vendors and Device Types
    • Glossary
  • Git-Based Source Control
    • Getting Started
      • Planning
      • Initial Setup
        • Migrations
    • Basic Tasks
      • Navigation
        • Home page
        • Exploring the Web App
        • Exploring the Desktop App
      • Configuration
        • Creating Repositories
        • Creating Templates
        • Cloning Repositories
      • Operations
        • Pulling
        • Committing
        • Pushing
        • Managing History
        • Binary & Large Files
    • Advanced Tasks
      • Branching
        • Branch Protections
      • Pull Requests & Code Review
        • Contributors
        • Reviewers
      • Merging
    • Additional Features
      • Topics
      • Issues
        • Milestones
        • Labels
        • References and Links
      • Wiki
      • Tags & Releases
      • Webhooks
      • Activity
    • Administration
      • Org Settings
      • User Management
        • External Identity Management (SSO + SCIM)
      • Teams & Permissions
        • Permissions by Account Type
      • Registration & Billing
      • Repo Settings
      • Desktop App Options
      • Profile and Settings
        • Notifications
        • Two-Factor Authentication (2FA)
    • Supported Vendors
      • ABB
      • Beckhoff
      • B&R Automation
      • CODESYS
      • Inductive
      • Lenze
      • Rockwell
        • RSLogix 500
        • RSLogix 5000
        • Studio 5000 Logix Designer
      • Schneider
        • Control Expert
        • Machine Expert
      • Siemens
        • Siemens Step7 TIA Portal
        • Siemens Step7 5.x
      • WAGO
    • Integrations
      • Discord
      • Jira
      • Microsoft Teams Connectors
      • Slack
      • Zapier
      • Microsoft Teams Workflows
  • DeviceLink
    • Getting Started
      • Architecture
      • Planning & Installation
    • Sites and Agents
      • Sites
        • Site Settings
        • File Lists
        • Graphs and Metrics
      • Agents
        • Creating a Site-Based Agent
        • Creating a Multi-Site Agent
    • Projects and Devices
    • Vendor Configuration
      • Beckhoff TwinCAT 3
      • CODESYS v3
      • Copia FTP
      • Copia sFTP/SCP
      • Copia Scripting
      • FANUC Robots
      • Rockwell RSLogix 500
        • Smart Filter
      • Rockwell Studio/RSLogix 5000
        • Smart Filter
      • Rockwell PanelView ME HMI
      • Schneider Control Expert
      • Siemens Step7 TIA Portal
      • Siemens Step7 5.x
    • Jobs
      • Job Navigation
      • Creating Jobs
      • Managing Jobs and History
      • Manual Backups
      • Pull Requests
    • Additional Features
      • Webhooks
      • Copia Import Tool
        • Getting Started
        • Preparing your data
        • Importing your data
        • Rolling back a prior import
    • Administration
      • Teams
      • Permissions
      • Notifications
  • Copilot
    • Copia Copilot
    • Getting Started
    • Using Copia Copilot
  • Copilot FAQ
  • Support
    • Best Practices
    • FAQs
      • Git-Based Source Control
        • Troubleshooting
      • DeviceLink
        • Troubleshooting
Powered by GitBook
On this page
  • Overview
  • Desktop App Merge (no conflicts)
  • Desktop App merge (with conflicts)
  • Handling PR conflicts in the Desktop App

Was this helpful?

  1. Git-Based Source Control
  2. Advanced Tasks

Merging

PreviousReviewersNextAdditional Features

Last updated 1 year ago

Was this helpful?

Overview

After branching, making changes, and receiving approval for merging those changes through code review, the last step is to merge your development branch back into the main branch.

There are two situations that you need to be aware of when merging your branch.

  1. Merging without Conflicts This means that no-one has modified the same files you were working on, in the original branch, while you were working on the branch.

  2. Merging with Conflicts This means someone has modified the same files you were working on in the original branch.

In case #1, you can just overwrite the original files with your changes, but in case #2 you will need to resolve the conflicts.

For Rockwell Studio 5000 and Siemens Step7 TIA Portal, Copia provides an Advanced Merge tool in the web app PR view to allow you to choose what sections of the code you want to include. Refer to these links for resolving merge conflicts using that software. For other merge conflicts, you will need to .

Desktop App Merge (no conflicts)

To merge your development branch back into main, click into the Current Branch dropdown, select the main branch, and click on the Choose a Branch to Merge into main button.

Select your development branch and press the Merge button. If you do not have any merge conflicts, the merge will perform as expected.

While you can always directly merge your changes back into the main branch, Copia recommends that you get into the habit of always creating a PR.

Desktop App merge (with conflicts)

If you attempt to merge a branch and someone else has already modified the file(s) within the main branch, you'll get the following warning:

You'll want to select your local version (the option NOT prefixed with origin/) and merge the files in. This will create a new commit. You can then navigate to the History tab to understand what you changed. We recommend you create another commit with the changes from remote that you overrode before pushing.

Handling PR conflicts in the Desktop App

If you're running into merge conflicts while trying to merge your pull request changes into the base branch, you can resolve them by following these steps:

  1. In the Desktop app, make sure the base branch and the feature branch are up-to-date with the latest remote changes. Select Fetch Origin from the top bar to pull the latest remote commits for your base branch.

  2. In the Desktop app, merge the base branch into your current feature branch by first ensuring that you are currently checked out in the feature branch, then in Branch settings, choose "Merge into current branch".

  1. After merging changes from the base branch, resolve all conflicts. You should bias towards selecting the changes made in your feature branch.

If you used the Advanced Merge Tool to resolve PLC file conflicts in the web app, it is very important to choose the version of the file from the feature branch

  1. After all conflicts are resolved, commit your merged and resolved changes and push them to your remote repository.

  2. After you've pushed your changes, go back to the web app and ensure that all changes look correct and after merge them into the base/target branch.

If Copia's Advanced Merge Tool is available for this filetype, use the Copia Web app instead. for more information. If you have run into merge conflicts when attempting to merge a PR,

Click Here
follow the instructions below
resolve conflicts manually in the Desktop app
Siemens Step7 TIA Portal - Advanced Merge
Rockwell Studio 5000 - Advanced Merge