解决简单的 svn 冲突
我是在 mac 上使用 svn 的新手。我正在使用版本。
我收到报告称我已经覆盖了其他开发人员的工作,所以我希望这里有人可以确保我做得正确。
我昨晚提交了我的工作,其他团队成员已经工作了一整夜,所以我今天做的第一件事就是更新我的存储库。
这样做后,我收到了各种文件,我将使用 css 文件作为示例:
myfile.css.r1593
myfile.css.r1587
myfile.css.mine
myfile.css
我有几个问题。
这些文件分别代表什么?
我应该如何解决冲突?
对我来说,使用 svn 避免覆盖其他人的工作并避免在存储库之外制作不必要的文件副本的最安全方法是什么?
I'm a bit of newcomer to using svn on a mac. I'm using Versions.
I've been getting reports that I've been overwriting other devs work, so I'm hoping someone here can make sure I'm doing things properly.
I committed my work last night, the other team members have been working through the night so the first thing I do today is update my repository.
After doing so I receive various files back, I'll use the css file as an example:
myfile.css.r1593
myfile.css.r1587
myfile.css.mine
myfile.css
I have a few questions.
What do each of these files represent?
How should I go about fixing the conflict?
What is the safest way for me to work with svn to avoid overwriting other peoples work and avoid making unnecessary copies of files outside of the repo?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
myfile.css.rXYWZ
表示XYWZ
修订版的myfile.css
。.mine
文件是您的原始文件。当文件与原始文件 (
myfile.css
) 发生冲突时,会添加一些标记。要修复冲突,通常需要检查标有冲突的文件并查看其中的差异。
通常你的部分被标记为
<<<<<<<<<< .我的
存储库部分标有
>>>>>>> .rXYWZ
。手动解决冲突,删除
mine
和rXYWZ
行,然后键入:然后您可以提交文件。
The
myfile.css.rXYWZ
represent themyfile.css
atXYWZ
revision.The
.mine
file is your original file.When the file is in conflict in the original file (
myfile.css
) some markers are added.To fix the conflict, usually you need to check the files that are marked with conflict and see the differences inside.
Usually your part is marked
<<<<<<< .mine
The repository part is marked with
>>>>>>> .rXYWZ
.Resolve manually the conflict, remove the
mine
andrXYWZ
lines and then type:and then you can commit your file.
如果您没有收到任何有关合并冲突的警告并启动了合并工具,您(我认为)必须配置版本或使用更智能的工具
解决冲突所需的免费文件(myfile.css 的修订版)。最旧的版本 r1587 - 最终文件的共同父版本,我的 - 您的文件,r1593 - 您同事的版本
检查冲突的字符串,告诉作者,找到正确的所有变体
If you didn't get any warning about merge conflicts and started merge-tool, you (I think) have to configure Versions or use more smart tool
Free files (revisions of myfile.css), needed for resolving confilcts. Oldest revision r1587 - common parent of final files, mine - your file, r1593 - version of your coworker
Check conflicted string, tells with authors, find correct4all variation
请看看这个替代方案。
我有冲突。
Please have a look at this alternative.
I have a conflict.