I am using a side-branch called live-deploy
- for automated deployment on the server - and the master
branch as main work-branch.
When something is ready to be tested live i will just overwrite the branch. The Problem is that i can't just reset it to master because the automated scripts can throw errors when i do that.
Now i tried to merge the branches using the ours
strategy, i got that from this question: How do I 'overwrite', rather than 'merge', a branch on another branch in Git?
git checkout master
git merge -s ours live-deploy
No errors and git tells me everything is fine but nothing happened in the live-deploy
branch. For example, there was a line i removed in master
and was still there in live-deploy
. After the merge nothing changed.
Shouldn't it be the same in both branches now? I have the feeling i do it the wrong way. Is there another way without using:
git checkout live-deploy
git reset --hard master