will you provide the commnads to merge from one branch to another using commands and if there is any conflicts i would like to override from source to destination branch so there should not be any manual conflict resolution should required.
please provide that is the way to achieve this.
Hi Suresh,
If you want to merge source-branch into destination-branch locally, you can do the following:
git checkout destination-branch
If you want to keep the version of the files in the source branch, in case of conflicts, you can then use:
git merge --strategy-option theirs source-branch -m "merge commit message"
If you want to keep the version of the files in the destination branch, in case of conflicts, you can use the following instead:
git merge --strategy-option ours source-branch -m "merge commit message"
You need to replace destination-branch and source-branch in the commands with the respective names of your branches, and also replace merge commit message with your own commit message for the merge commit.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.