I am using Git Flow, "A successful Git branching model":
https://nvie.com/posts/a-successful-git-branching-model/
but I do not fully understand it, so I am asking your help.
In our project we are using gitlab and there are 2 branches from the project which is the master and develop.
I was told to branch out from the develop branch so heres what I did:
- First is that I clone the remote repository, the default branch is master
- Second I branch off from develop branch using the command -
git checkout -b develop origin/develop
- Now in my local I have two branches master and develop
- I have a question when creating a feature branch, is it only locally?
like using the command
git branch -b feature_branch
, is this process correct ? - Now if the above process is correct, and I have my changes on the feature branch should I merge it into the develop branch? is that right?
- Now If I want to push my local changes, should I push it to the remote develop branch? or on the master branch?
- If I pull changes from my team, should I pull it from the remote master branch? or in the remote develop branch?
Can anyone give a clarification to this, if you can give right commands, I'll appreciate that also, thank you. or a step by step process.