I have two branches lets assume that to be A and B
A is the master branch which will be used for production and B is another branch which I am using for testing in local.So I am working on branch B with local database and while sending emails i send it to myself since it should not be send to the guests while I am testing locally.
So I have a file named booking_confirmation.cs in which the email will be mine when I test locally and when I switch to master branch it will be the live guest emails.
So I have made few changes other than the email part I want the email to be the same so I won't have to change every time I switch the branch.Now my issue is I need only the other changes I make in the branch B of the file without any switch in emails.
What I tried is
I checked out the master branch to make sure it is in use
git checkout A
and then I checked out the specific file from branch B which I need in branch A so I tried
git checkout B booking_confirmation.cs
If there is no conflicts in the file which i am about to merge git auto merges it without any problems but if there are conflicts i get the below error
-not something we can merge
So is there a way to merge the file so that i can select/merge which part of the file i need in master branch.Any help would be really appreciated.
Thanks in advance !