You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even though the master branch is protected, it's possible to commit to this branch (not push though), and this makes a mess and it's quite annoying to fix.
It would be great if commits to protected branches are restricted according to the users permissions, just as it happens in github web. image
Version
GitHub Desktop: 1.1.1
Operating system: Microsoft Windows [Version 10.0.16299.125]
Steps to Reproduce
Set branch protection for master in repository settings/branches and enable:
Protect this branch.
Restrict who can push to this branch.
Login to Github desktop with a user that has no push permissions to the master branch.
Add new file and commit to master branch.
Expected Behavior
Warning message or disabled commit button when trying to commit to a restricted branch.
If it's a warning message, please make it a bit friendlier with a message like "You can’t commit to master because it is a protected branch."
Actual Behavior
The commit is made to the master branch even though I have no permissions for this branch.
The push is not permitted and now I'm aware I'm working in the wrong. Oops.
I switch or create new branch but now I have no changes to commit :( and know I don't know what to do.
@workobots thanks for the feedback. I'm going to merge this into #3633 which is an earlier issue but focused on merging branches rather than committing directly - it's the same underlying issue.
Activity
shiftkey commentedon Apr 15, 2018
@workobots thanks for the feedback. I'm going to merge this into #3633 which is an earlier issue but focused on merging branches rather than committing directly - it's the same underlying issue.