On Thu, 7 Apr 2016 05:05:05 -0700 (PDT)
Konrád Lőrinczi <klorin...@gmail.com> wrote:
First, sorry for the late reply.
> I have two branches and I would like to merge them.
> I have merge conflicts in more thousand files, but most of these have
> no difference in file compare.
What exactly is "file compare"?
Please note that comparing files managed by Git may be tricky due to
possible effects of EOL "normalization". The issue here is that if you
perform "normal" checkout of a file from the Git database Git will
apply EOL conversions as configured. I'm also not sure that
`git show <commitish>:path/to/file` does not perform such conversions
even though its documentation uses the word "raw" when discusses this
Hence, to verify, I'd resort to using `git ls-tree [-r]` and then
`git cat-file blob <sha1name>` after figuring out what blob you'd like
to check from the output of the previous command: AFAIK `git cat-file`
by default has any text conversion turned off.
> There might to be two kind of problems here:
> 1) DOS & Unix linefeed differences
> 2) file permissions are different
> There are thousand of files, so doing this merge conflict solving one
> by one is a nightmare.
> - Is there a solution to fix permissions to 755 for directories and
> 644 for files automatically?
That's a red herring: while Git indeed records "file mode bits"
it does not actually store permission bits. What it stores, is to tell
files (always 0644) from directories (always 0755) and symlinks (don't
remember). As an exception, it stores the executable bit as well.
No owner UID and GID values are stored; no POSIX (or whatever) ACLs are
The solution would amount to scripting around the `find` and `chmod`
programs, like, say
find . -type d -print0 | xargs -0 -n 30 chmod 0755
find . -type f -print0 | xargs -0 -n 30 chmod 0644
> - Is there a solution to convert linefeeds from DOS to Unix for files
It's a complicated topic.
If you mean Git's own solution, then in theory you might prepare a
suitable .gitattrubutes file (or .git/info/attributes) which would
force certain EOL style for certain kinds of files and then perform
forced checkout -- to have some consistent state in the work tree,
and then possibly forced adding of all the files to the index and
committing -- to have the files normalized in a certain way in the
> - Is there any way to do these fixes for the initial commit? (Because
> I would like to connect two separate branches one over other using
> fast forward merge).
Well, yes, that's what `git filter-branch` is for.
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
For more options, visit https://groups.google.com/d/optout.