How to prevent merging the target branch ('XYZ' branch) from source branches ('ABC' branch) #67800
Replies: 4 comments 3 replies
|
I think you can use branch protection in the repository settings. repo > settings > branches > add branch protection rule > enter branch name |
|
To prevent developers from accidentally merging a specific source branch ('ABC' branch) into a target branch ('XYZ' branch), you can use branch protection rules in your version control system, such as Git. Below are the steps to implement this:
This setup will prevent developers from accidentally merging 'ABC' branch into 'XYZ' branch by requiring code reviews and passing status checks for any changes made to 'XYZ'. However, developers should still be able to merge 'PQR' and other branches into 'XYZ' without any issues. Please note that the exact steps and options may vary depending on the Git hosting platform you are using (e.g., GitHub, GitLab, Bitbucket, etc.). The steps above provide a general guideline, but you should refer to your specific platform's documentation for precise instructions. |
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
How to implement to preventing developers from accidentally merging specific branch from a specific branch?
Question
Body
How to prevent merging the target branch ('XYZ' branch) from source branches ('ABC' branch)
but i can merge 'PQR' branch and any other branches into XYZ branch
how to apply ruleset to only prevent merging the target branch ('XYZ' branch) from source branches ('ABC' branch)
How to implement to preventing developers from accidentally merging specific branch from a specific branch?
All reactions