In recent years I’ve changed my approach to GIT version control to use a forking method vs. branching. While I still create branches, sometimes a lot of branches, where I create those branches has changed.
Let’s say for example that I’m working on a team of 5 developers creating features and making magic with software. We’re all working on different tasks and using feature branches to manage everything. That works fine most of the time, but it can get messy real quick. So I’ve moved to a forking method that works well, though it does require some additional management to keep everything up to date.
- In your terminal, change directory to your project
cd /working/directory/of/project
- Checkout branch that you want to merge into, ex: master
git checkout master
- Pull the upstream (parent of your fork)
git pull upstream master
- Deal with any merge conflict, review any changes
- Update your fork with the new changes
git push origin master