【发布时间】:2019-03-06 18:47:36
【问题描述】:
所以我目前正在尝试使用 git-svn 将 git repo 中的代码合并到我的 svn repo 中。我在 svn repo 中的代码是在 linux 上开发的,没有任何回车,我相信 git repo 中的代码也是在 linux 上开发的,因为我也没有在文件中看到回车。这是我将文件从 git repo 拉入 svn repo 的方法:
1. mkdir new_directory
2. cp -a /path/to/git/repo/. new_directory && cd new_directory
3. rm -rf .git/
4. git init
5. vim .git/config (and add):
[svn-remote "svn"]
url = https://link/to/svn/repo
fetch = :refs/remotes/git-svn
6. git add .
7. git commit -m "message"
8. git svn fetch svn
9. git checkout -b svn git-svn
10. git merge master
一旦我点击第 10 步,我就会在几乎每个文件中收到合并冲突的消息。经过调查,我发现我的 svn repo 中的每个文件现在都有回车,因为某种原因。我已经尝试将autocrlf = input 添加到 .git/config 中,但它只解决了一小部分文件中的问题。
我不太确定 git-svn 在这里做什么;我在post 上找到了这些步骤。任何建议将不胜感激。
【问题讨论】:
标签: git svn core.autocrlf