When I merge a branch in Git to master I often get merge conflicts. Is there a way to merge a branch and just overwrite the stuff in the current branch?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Add
-X oursargument to yourgit mergecommand.Say you are working in your local branch. Then you want to merge in what went in the
master:On the other hand if you are in
masterand want to merge your local branch intomasterthen @elhadi rightly says you should usetheirs: