我想做
git svn dcommit
但我得到
Merge conflict during commit: File or directory
'.gitignore' is out of date; try updating: resource
out of date; try updating at /usr/lib/git-core/git-svn line 922
如何仅从 svn repo 更新.gitignore
?
听起来您对 .gitignore 进行了未提交的本地更改 - 您需要先将它们移开,然后才能使用 .gitignore 从 svn 远程更新git svn rebase
。
采用
git stash
暂时隐藏您的本地更改,然后用于git svn rebase
从 svn 获取最新版本。接下来,您可以使用恢复临时更改
git stash pop
Git 将报告您可以在本地修复的任何冲突,或者如果您决定不再需要本地更改,请使用:
git checkout -- .gitignore
用从存储库中获取的文件覆盖您的本地 .gitignore 文件。