Choose Git merge strategy for specific files (“ours”, “mine”, “theirs”)

I am in the middle of rebasing after a git pull –rebase. I have a few files that have merge conflicts. How can I accept “their” changes or “my” changes for specific files? $ git status # Not currently on any branch. # You are currently rebasing. # (fix conflicts and then run “git rebase … Read more

Git error on commit after merge – fatal: cannot do a partial commit during a merge

I ran a git pull that ended in a conflict. I resolved the conflict and everything is fine now (I used mergetool also). When I commit the resolved file with git commit file.php -m “message” I get the error: fatal: cannot do a partial commit during a merge. I had the same issue before and … Read more

Git conflict markers [duplicate]

This question already has answers here: Git merge left HEAD marks in my files (5 answers) Closed 9 years ago. After I pulled from remote branch, I got conflict, when I open the file it looks something like below: <<<<<<< HEAD:file.txt Hello world ======= Goodbye >>>>>>> 77976da35a11db4580b80ae27e8d65caf5208086:file.txt I need some explanations of the markers, which … Read more

Resolve Git merge conflicts in favor of their changes during a pull

How do I resolve a git merge conflict in favor of pulled changes ? Basically I need to remove all conflicting changes from a working tree without having to go through all of the conflicts with a git mergetool while keeping all conflict-free changes. Preferably doing this while pulling, not afterwards. 1 13 git pull … Read more