How to delete files form local branch without affecting the origin branch?

So I have a main remote branch form which a new branch was created, let’s call it sub_branch_1. I was able to edit my local sub_branch_1 and then push to the remote sub_branch_1 without affecting the main branch. Likewise I created another branch, let’s call it sub_branch_2, from sub_branch_1. Similarly I was able to edit my local sub_branch_2 without affecting the sub_branch_1.

Today when I tried to create another branch, sub_branch_3, from the sub_branch_1 it didn’t work the same. Everything I do in sub_branch_3 are mirrored and updated in sub_branch_1. Why is that? Is there a special setting I missed?

I create all the sub-branches from the gitlab website and then I update my local depository from Pycharm 2021.2.3.

Hi @cp_git
I am not familiar with Pycharm, but are you sure that locally you are on the correct branch when making changes?

Hi yes I am sure I am at the correct local branch