I've somehow got myself into a git mess. (Hosted in visualstudio.com).
I have a basic repo with just 'master'. I want to now have a gitflow scenario working. So, I want to create 'develop' And then branch off develop for features.
To check my local branches now, I execute git branch -r
origin/HEAD -> origin/master
origin/develop
origin/master
This looks strange to me. It seems on the server, I have 3 branches. But not sure if it's right, as far as gitflow goes. Not sure what the HEAD one is doing.But maybe it's just saying that master is HEAD?
I run git branch -l
* develop
master
That seems to indicate that locally, on my PC, I have two branches, and I am in develop. Again, seems OK to me. Not sure if it's 'tracked' though to the server.
Now, I want to do a feature called test.
So in source tree, as my command lines skills are junk, I try this:
But am faced with a shocker of an error:
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks branch develop/test fatal: cannot lock ref 'refs/heads/develop/test': 'refs/heads/develop' exists; cannot create 'refs/heads/develop/test' Completed with errors, see above.
I go to visualstudio.com to check what it thinks is happening, and my branches look like this:
I am hopefully making a silly error, but how can I get a good flow of:
master, develop, and then develop/feature_name going... with pull requests into master?
Edit: I think I've had a brain fart! I don't create a develop/my_branch branch! I think I create a feature/my_branch OFF develop. And then I have this:
And then I marge my feature branch into develop, and then can do a pull request from develop into master once develop goes live. Does this seem right?