0

I want to avoid accidentally editing master branch in my project. PyCharm has a great feature to "lock" the branch.

enter image description here

The problem is that it's almost useless because it locks the branch only until switching to another. If I checkout another branch and then go back to master, it's unlocked.

Is it possible to do this permanently or some alternative using pure GIT?

Milano
  • 18,048
  • 37
  • 153
  • 353
  • 1
    Option you mentioned doesn't lock branch - it sets read-only status on currently opened file. You could find some suggestions in this thread: https://stackoverflow.com/questions/2471340/is-there-a-way-to-lock-a-branch-in-git – y.bedrov Oct 24 '18 at 11:14
  • @y.bedrov Thanks! – Milano Nov 02 '18 at 14:52

0 Answers0