Git: false merge conflicts?
I've been using git for a few years, and every once in a while when doing a merge, git reports some bizarre conflicts. Here's an example of an .htaccess file, from when I merged in the new 7.24 release of Drupal core:
# Protect files and directories from prying eyes.
# Hide important scripts from malicious users.
How is there a conflict here? It's not even a potential case of whitespace/endline differences: there's simply nothing in the 7.24 section of the conflict.
Why is git complaining about this? I'm probably misunderstanding something fundamental...
Is there any way to review list of conflicts (names of conflicting files and number of conflicts in it)? The only thing I have discovered is to review pre-created .git/MERGE_MSG file... but this is no
In the code repository I am working with, when I do a pull, Git warns of a merge conflict and puts out an error message that says: Automatic merge failed; fix conflicts and then commit the result. So
I get conflicts on a merge between two local branches when only one has changed. Worse still, the conflict markers make no sense. This has happened twice now. Can someone tell me what is going on here
When I try to rebase one of my branches onto another, git is not able to merge and raises conflict. I can see the following in the conflicted file: <<<<<<< HEAD ======= if (($mod
I have don a git svn rebase and I got a conflict. I want to use git-merge-file to merge the two versions of the file by choosing the version on the server. git-merge-file has this option called --thei
Let's assume you are merging one branch in Git to another one(no fast forward of course). And you don't have conflicts, so the merge should be successful, without interruptions. But by some reasons yo
Here is a lot of what I'm getting: <<<<<<< HEAD code ======= >>>>>>> Merge branch 'master' of code_url into not_master and there are tons of those occurring
I just finished resolving some conflicts due to a pull from the remote repository of my project. I know that once conflicts have been resolved you have, to my knowledge, 2 solutions : git rebase --co
We're using Git 18.104.22.168. Given multiple branches with names BRANCH_1, BRANCH_2, ... BRANCH_N, is there a programmatic/scriptable way to tell what conflicts will exist if we want to merge all of these?
i have a litte messed up my git repo. I worked on a feature in a separet branch. After finishing the work, i switched to the master to merge it into. But my partner pushed a few files with come in con
I'm trying to do a merge where I have conflicts and one file has diverged massively. The eclipse git merge tool is great for small changes, but one of my files is large and has hundreds of explicitly
So I have a project on which me and another guy, are doing our thing. We are using 'git' for version control. Now, he has his own branch version2 and I have my branch version 1. We both have commi
For merging I use this to keep mine git merge -X ours foo and this for keep theirs git merge -X theirs foo However on my latest merge it looks best to keep both sides. Does Git have a strategy
I have a pull request that Github says it can't automatically merge. This change is behind master a few commits, but without conflicts. Manually merging I don't get any conflicts, and I get this outpu
Assuming we have one trunk and one branch (COKE). (I run Git over SVN and merge from trunk to COKE with svn, not Git) There have been changes in FILE1 on trunk that we want in COKE branch. We merge f
I am learning git. I have a file called README which contains a,b,c,d. I created four branches out of master. User on branch 1 changes a to p, user on branch 2 changes b to q, user on branch 3 changes
Overview: $ git pull ... time passes ... $ git checkout topic # remote topic $ git checkout master $ git merge topic $ git push non-fast-forward updates were rejected $ git pull merge by rebase $ git
I've been working with another person on a repo we host at github. Everytime I or he pulls, git forces us to make a merge commit (vim opens up with a commit description), although we were working on d
I can't pop my stash because I merged a branch which apparently conflicts with my stash and now my stash is seemingly unable to be popped. app.coffee: needs merge unable to refresh index Anyone know
I'm seeing conflicts during git rebase when I don't expect any. I have * - A master \ B - C - D - E release Now I do % git checkout release % get rebase master release [...] CONFLICT (content): Merge
Following on the scenario from this question, I'm performing a git rebase -s recursive -X theirs etc... and am surprised to be stopped with the following types of conflicts: added by them deleted by
I need to show to the people that have to review the PR the conflicts I fixed. Is there a way with git to export in a text file all the conflicts? What I need is a text file with a cat of all the fi
How does gitmergetool works. I have conflicts while doing git merge and now I want to get rid of those merge conflicts and I was browsing SO to get some information on how to do it and there was one s
I want to know an exact algorithm (or near that) behind 'git merge'. The answers at least to these sub-questions will be helpful: How does git detect the context of a particular non-conflicting chang
i'm looking for a console UI tool for resolving merge conflicts in git... like vimdiff but 'easier'
I am puzzled by git (I've always used svn), my use case is as follows: I change File1 on my local repository while my friend changes the same file on his. Both changes are useful. He commits and pushe
I have two branches, master and development. When trying to merge development into master with git merge development, I get loads of conflicts. I'm not interested in resolving any conflicts, I just wa
git-rebase man page mentions -X<option> can be passed to git-merge. When/how exactly? I'd like to rebase by applying patches with recursive strategy and theirs option (apply whatever sticks, rat
My usual workflow with git is to create a new feature branch, do some work with frequent commits, and then merge back into the development branch when the feature is working and/or stable. Usually, w
After I solved all merge conflicts of important files, I want to merge regardless of all left conflict files. Git should just keep the files from the branch I want to merge in (--ours). How can I do t
I would like to know if there is a way to solve some conflicts (caused by merge or rebase) and send it to another person who will solve the rest of conflicts. It sometimes happens, eg. you work on a b
My current process is: git checkout dev make changes and commits (& push to development branch on origin occasionally) git checkout master git merge dev git push origin master git checkout dev
I'm trying to combine code on two branches with the 'git merge' command, but git is crashing during the process. I need to find an alternative way to merge these branches. To increase merge output to
I have the following situation created a branch 'dev' worked on 'dev' worked on 'master' At some point I want to merge my work from 'dev' into master $> git checkout master $> git merge dev T
Can someone help me on what is the right command that I can use for resolve conflicts for all files under a specific path with --ours strategy? I've tried so far: git checkout --ours public/ git che
I have a parent branch A with a child branch B. In branch B i have two separate commits. I merged branch B in A with squash like this git merge --squash B When i compare branch A with branch B: git l
I'm fairly new to Git, and have been working with it for only 3 months. We previously migrated our repositories from SVN. I'd like to be able to merge changes from the master into my dev branch withou
When I do a pull in git and have to do manual conflict resolution, I then do a rebase and I end up having to resolve the same conflicts again. I want to figure out a process where I only have to resol
I tried to commit the changes. After a lot of problems and conflicts, I managed to resolved every problem. However, the code I committed is not currently on any branch (as the git status shows). How c
I pulled the latest code from the repository with git pull --rebase. My local commit conflicts with one of the remote commits. The file in question has the merge markers in it, so I can compare my ver
How do I merge git users? I made several commits using an incorrect user name and now they are shown in the repo history, I would like to merge them with my real name that I'm going to use for the gi
This SO question perfectly describes our situation: What is the right way to commit/push when there are conflicts in git(tortoise git) There is no answer (atleast not one that is accepted) on the abov
Here is our current feature branch work flow -> From the master create a new feature branch. Commit work to the feature branch. Merge the master into the feature branch as we work to keep it up
I have two git branches B1 and B2. B2 has the newest copy of my file F. When I merge B2 into B1 ( git checkout B1 && git merge B2 ) the log for F ( git log F) does not contain any of the commi
I need to merge two Git repositories into a branch new, third repository. I've found many descriptions of how to do this using a subtree merge (for example Jakub Narębski's answer on How do you merge
A---B---C topic / D---G master Say I have the above branch structure in git. If I do git checkout topic followed by git rebase master, from what I've experienced, I will have to resolve conflicts for
I am using git extensions to merge by branches. However, I see same branch listed multiple times with different paths. I know that they refer to the same thing but why are they listed multiple times ?
How can I tell git to ignore my local file and take the one from my remote branch without trying to merge and causing conflicts?
I'm using SourceTree and Git-Flow pattern. Now I have prepared a release for my beta-testers to test so I created a new release/v1.0.1 branch. But my mind slipped and I decided to finish (merge into d
Assuming I have a parent stream and a child stream. There are no other active streams. If I rebase child stream to parents' recommended baseline, resolve all conflicts and then deliver from the child