I was trying to create a feature sub-branch, feature/featureName.
There was some confusion amongst my team as some of us are using SourceTree and some of us are using Git Bash. In SourceTree, the subbranches get listed under feature, and we assumed this was a 'holder branch' which you then create subbranches under.
Thus, our process was as follows:
- Created and pushed a
main,development, andfeaturebranch - Checked out to
development - Tried to create
feature/featureName - Got the error
fatal: cannot lock ref 'refs/heads/feature/FeatureName': 'refs/heads/feature' exists
We did not understand why this was happening. Luckily we found out!