Hi Vineeth Kalangi ,
Welcome to Microsoft Q&A platform and thanks for posting your query here.
If the publish branch is out of sync with the main branch and contains out-of-date resources despite a recent publish, you can use either of the below solutions:
- Option 1: Use Overwrite live mode functionality
It publishes or overwrites the code from your collaboration branch into the live mode. It considers the code in your repository as the source of truth.
Code flow: Collaboration branch -> Live mode
- Option 2: Disconnect and reconnect Git repository
It imports the code from live mode into collaboration branch. It considers the code in live mode as source of truth.
Code flow: Live mode -> Collaboration branch
- Remove your current Git repository
- Reconfigure Git with the same settings, but make sure Import existing Data Factory resources to repository is selected and choose Collaboration branch (same branch)
- Create a pull request to merge the changes to the collaboration branch.
Note : It is only necessary to create and merge a pull request if you are working in a repository that does not allow direct commits. In most organizations, submissions into the repository require review before merging so the best practice is usually to use this approach. But in some cases no review is required, in which case it isn't necessary to create and merge a pull request, but changes can be directly committed to the collaboration branch.
Choose either method appropriately as needed.
Reference: Troubleshooting Git integration | Stale publish branch
Hope it helps. Kindly accept the answer by clicking on Accept answer
button. Thankyou