Override one branch with another
Having the following two branches:
-old_code: the code in this branch will be overriden
-new_code: the branch used to override the other branch
here are the commands to do it:
$ git checkout old_code
$ git tag old-old_code # This is optional
$ git reset --hard new_code
$
$ # Using a custom commit message for the merge below
$ git merge -m 'Merge -s our where _ours_ is the branch staging' -s ours origin/old_code
$ git push origin old_code
No comments:
Post a Comment