Greetings & Welcome to Microsoft Q&A forum! Thanks for posting your query!
We have github repo which is connected to our synapse environment, anytime someone configure git it makes a commit to master branch
The behavior you are experiencing, where Synapse automatically commits changes to the linked Git branch (e.g., master or main) is by design. Synapse treats its workspace as the source of truth, and unfortunately, it does not natively support automatically pulling updates from GitHub when changes are made in the repository.
we want to pull the updates from github rather than updating from synapse to git
If you want to pull updates from GitHub rather than pushing changes from Synapse. Here are some steps you can follow, as they might offer some insights.
Disable Automatic Commits - Before configuring Git in Synapse, ensure that there are no unsaved changes in your Synapse workspace. You can also configure Synapse to work with a temporary branch instead of the master branch during the initial setup to avoid unintended commits.
Manually Pull Updates from GitHub - In Synapse Studio, use the "Sync with Git" option under the Git Configuration settings to manually pull the latest updates from GitHub. This allows you to bring in changes without automatically committing changes from Synapse.
Establish a Clear Workflow - Treat GitHub as your primary source of truth. Make all updates directly in the GitHub repository and manually pull changes into Synapse when needed. Consider working with feature branches for development. Once updates are reviewed and merged into the main branch, you can sync them with Synapse.
Automate Syncing (Optional) - If syncing updates from GitHub to Synapse frequently is a priority, you can explore automation options such as:
- GitHub Actions or Azure DevOps Pipelines to automate update workflows.
- Custom scripts to regularly fetch changes and sync them with Synapse in a controlled manner.
For more details, please refer: Source control in Synapse Studio
I hope this information helps. Please do let us know if you have any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.