Background/Situation
Users are unable to perform squash or interactive rebase actions for certain commits when those commits are also present on a protected branch.
Question
Why are the options squash commits and interactive rebase from here greyed out on certain commits?
Cause
This is because the IDE restricts such actions to ensure the integrity of changes in protected branches - to avoid potentially unwanted modifications of the remote repository history.
Answer
If the target commits are both on the protected branch and the unprotected branch, the mentioned options are disabled. This is because the commits are already pushed to the protected branch on GitHub, which means they are public and their hashes should not change.
However, the option should not be disabled on commits that are only on the unprotected branch. Since they are not yet pushed to GitHub remote repository.
- Protected branches are configured in Settings (
⌘ + ,orCtrl + Alt + S) > Version Control > Git > Push > Protected branches.
Comments
0 comments
Please sign in to leave a comment.