Re: [git-users] Why merging git branch produces conflicts in lines which haven't been changed by me?

2015-06-14 Thread Gergely Polonkai
Hello,

did you modify the conflicting *files*? Maybe git's diff/merge algorithm
gets confused about some lines, but without actual real data it's hard to
tell.

Best,
Gergely
On 14 Jun 2015 05:19, "YV"  wrote:

> I have a standard situation: forked project P on github into my project M.
> Cloned M to local disk, branched master->B on disk. Made few changes in B,
> committed and pushed B into M.
>
> Then upstream P made a lot of changes themselves in P/master. 'git fetch
> upstream && git checkout master && git merge upstream/master' - synced my
> master branch ok. Now 'git checkout B && git merge master' says that there
> are conflicts in 2 files. When I look at these lines, I didn't touch them
> where it says there are conflicts. Additionally, it shows that many files
> are modified, also some files are newly added, and I didn't modify or add
> them. When I merge with 'git rebase master' command, it shows that there
> are conflicts in 3 files, but no added files, and many modified files are
> also gone.
>
> Why untouched by me master branch merges fine, and the same merge on
> slightly modified branch B shows a lot of changes that I didn't make? Both
> master and B have the same base, and are very close.
> Why 'git merge' shows conflicts in fewer files than 'git rebase'? Isn't
> conflict either there or not there? It shouldn't depend on the method of
> merge.
> Why it shows changes that came from upstream as if I made them?
>
> There are probably one or two real conflicts, but git just doesn't show
> them properly.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[git-users] Why merging git branch produces conflicts in lines which haven't been changed by me?

2015-06-13 Thread YV
I have a standard situation: forked project P on github into my project M. 
Cloned M to local disk, branched master->B on disk. Made few changes in B, 
committed and pushed B into M.

Then upstream P made a lot of changes themselves in P/master. 'git fetch 
upstream && git checkout master && git merge upstream/master' - synced my 
master branch ok. Now 'git checkout B && git merge master' says that there 
are conflicts in 2 files. When I look at these lines, I didn't touch them 
where it says there are conflicts. Additionally, it shows that many files 
are modified, also some files are newly added, and I didn't modify or add 
them. When I merge with 'git rebase master' command, it shows that there 
are conflicts in 3 files, but no added files, and many modified files are 
also gone.

Why untouched by me master branch merges fine, and the same merge on 
slightly modified branch B shows a lot of changes that I didn't make? Both 
master and B have the same base, and are very close.
Why 'git merge' shows conflicts in fewer files than 'git rebase'? Isn't 
conflict either there or not there? It shouldn't depend on the method of 
merge.
Why it shows changes that came from upstream as if I made them?

There are probably one or two real conflicts, but git just doesn't show 
them properly.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.