I think it's okay to split the development of the feature into three different branches in order to organize the work in a best way.
So I started to work on feature 1.1, I have written some code, and in
doing so, I have found a bug (not directly related to the sub feature
1.1 or the main feature 1), what should I do?
I agree with the second solution. Anyway you're still developing a feature that is not released. If this feature was already part of your master
branch, then it would make sense to create a separate branch for the fix. For this reason I don't see any point to working using the first solution.
After I have merged my Feature/1.1/ branch with Feature/1/, I found a
bug in my Feature/1.1/ code, or I just want to make some changes there
- is it OK, to switch back to Feature/1.1/, merge current Feature/1/ branch, make my changes and then merge them back to Feature/1/? Or
should I create yet another branch based on current Feature/1/ code to
do the changes ?
I think the best and fast way is to create another branch on current Feature1
code, apply the fix and merge.
Note: What you're asking for are personal opinions about the way of the work. There's no guarantee or proof that each own personal way to create and merge branches is the best way. For each of us, our own personal way is the best.