I am using msysgit git for windows to work in the central svn repository. I use git as I want it to have a terrific little local branch for everything and a swap between them.
I also need to update the central repo often, so using a separate svn / git is not an option.
Problem - git svn --help (man page) says it is not recommended to use git merge in the main branch (which is configured to track from the svn trunk) from local branches, as this will destroy the side and git svn dcommit will no longer work.
I know this is not entirely true, and you can use git merge if you merge with a branch that was properly falsified by master before merging, but I'm trying to make it more secure and actually use git format-patch and git am . We use a code review, so I make patches anyway. I also knew about git cherry-pick , but I just want git am /reviewed/patches/dir/* without reminding which commits correspond to these patches (without reading the patches, i.e.).
So what happened to git svn and git am ? It's simple - git am for a few very difficult points does CRLF to LF conversion for corrections ( git-mailsplit does this, to be precise), if not rebasing. git format-patch also creates the correct (LF-end) patches.
Since my repo is basically CRLF (and it should remain that way), patches obviously fail due to a bad EOL. Converting diff to CRLF and somehow hacking git am to prevent it from converting doesn't work either. It will fail if any file is deleted or deleted - git apply will complain about the expected / dev / null (but it got /dev/null^M ).
And if I apply it with git am --ignore-space-change --ignore-whitespace so that it git am --ignore-space-change --ignore-whitespace LF endings directly to the index, which is also strange. I donβt know if he will save this in svn (via git svn dcommit ) and check it, and I donβt want to try.
Of course, you can still try hacking patches to convert only the actual differences, but this is too much hacking for a simple task.
So, I wonder if there really is no way to create patches and apply them to the same repo in the same system? It is just strange that msysgit cannot apply its own patches.