I have next scheme:
master --> dev --> final --> prod
____________|^ ^
| | |____________________________
| |_______ |
| | |
next version --> dev --> bug fixed --> dev --> bug fixed --> .....
As you can see from this scheme, we have finished and deployed the master branch to production. Then we have started new version of the project and did another branch. During the dev process we find some bugs and have to fixed it for both branches.
Previously I did it manually thru comperesing window in my editor and my algorithm was next:
(current branch "new version")
git add .
git commit -m "fixed bug"
git push
git checkout master
(put fixes manually)
git add .
git commit -m "fixed bug"
git push
But the last fix is touching multiple as js as html files.
From some researches in internet I have found 2 options:
1. git merge
- as I could understand it will be full merging between both branches
2. git rebase
- I think this is what I'm looking for but I'm not sure that this is exactly what I need.
So can anybody help me with my doubts?