I know this question is asked many times on SO.
I just wanted to get proper way of branching and fixing mine.
My working methodology on Git branching is:
- Checkout to master
- Take pull of all branches one by one on master ( if there are any latest branches that are not merged on master yet but existed on remote ) Checkout new branch from master.
- Work on that branch
- Push to Git
- Now again checkout to master
- And take pull again
- And then checkout to new branch again.
- All above.
So, I know this is not the right way to doing this Git branching.
I always stumbled myself on these branching and sometime I lost work too due to wrong branching and push pull.
Can anybody explain the write way of doing this branching properly? Including best practices as well. So, I will follow those procedures for my current project.
Also, my main concern is having latest code all the time on any branch ( I think master as we checkout new branch from that branch )