本文介绍了Redmine& Git集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑从svn和Trac转移到git和Redmine。我只是想知道每个人的经历是什么。 git与Redmine的整合情况如何?



我决定从svn改为git - 我们的分布式工作,需要经常分支和合并使用git让生活变得相当容易。但是我们可能需要将事情分成多个项目。从我一直在阅读的内容来看,git和多个项目与Trac的整合并不太顺畅。除此之外,在我对git的调查中,Redmine也引起了我的注意,其中一些功能看起来非常有用。

然而,我还没有发现许多用户git和Redmine的经验(我可能是因为缺乏搜索技巧),所以想听听你的意见和例子。

解决方案

去年我建立了一个使用和Redmine的系统。您可以直接将Git与Redmine集成,没有任何问题,但我强烈建议您查看Gitorious以及控制存储库并遵循其事件的工具。它也可以用来控制对存储库的访问等。



集成Gitorious和Redmine非常简单。我写了一个剧本,打破了Gitorious的道路。当你使用Gitorious时,它们被保存在文件系统散列中,因此将这些存储库链接到Redmine将会有点复杂。我的脚本以更易读的格式与这些存储库建立链接,因此将它们链接到Redmine非常简单,并且只在创建项目时需要一次。您可以在找到脚本。



基本上你不需要担心集成问题,因为Redmine支持git开箱即用。当然,你需要让git服务运行在你的生产仓库的服务器上(你链接到Redmine的那些服务器,做你的自动化测试等),但这也可以用Gitorious来解决。



其实我写了关于这个问题的学士论文。由于Gitorious和Redmine都开发了很多软件,所以它已经有点过时了,但是如果您想阅读它,我可以使其可用。本文解释了需要完成的工作(这两个工具已经解决了一些问题),并且还包含一个持续集成环境,当用户将更改推送到存储库并将其放入代表存储库时,它会自动构建包,测试人员等等,可以很容易地通过网页浏览器下载。



Redmine去年出现了一些问题,特别是子项目的缺乏有点令人讨厌,但这已被纠正0.9版本。另外插件应该在投入使用之前进行测试,有些只是混合不好,有些根本不工作(可能是Redmine版本与插件版本的冲突)。总而言之,Redmine工作得很好,应该可以轻松扩展以满足您的需求。对Gitorious的支持是非常好的,对于Redmine来说它有点零星的(该死的法语?),但是这两种工具都有足够大的用户基础,因此他们应该是安全的赌注。
非常好的版本控制工具,尤其适用于敏捷团队。这需要一些学习,你应该写一篇关于如何使用它的指南,以便开发人员充分利用它,但是一旦你了解它,它就会非常高效。我们写了我们自己的说明,说明了正常的工作过程。应该解释分支,合并等,例如在你的个人存储库的master分支上工作并不是一个好主意。总是创建一个分支并在那里工作。当你从其他版本库中更改主控分支时,通过这种方式处理合并更容易 - 而且你不会意外推送一些你并不想要的东西。


I am considering moving from svn and Trac to git and Redmine. I'm just wondering what everyone's experience is of this. How well does git integrate with Redmine?

I'm pretty set on my decision to change from svn to git - our distributed work, and need to frequently branch and merge would make life considerably easier with git. But we would possibly need to split things into multiple projects for this. From what I have been reading, git and multiple projects don't integrate too smoothly with Trac. That aside, in my investigations into git, Redmine has also caught my attention, and some of the features look very useful.

However, I haven't found as many user experiences of git and Redmine as what I'd like (possibly due to my lack of searching skills...) and so would like to hear your opinions and examples.

解决方案

I built a system last year which used Gitorious and Redmine. You can integrate git directly with Redmine, no problems there but I would strongly suggest you have a look at Gitorious as well as the tool to control your repositories and follow their events. It can also be used to control access to the repositories etc.

Integrating Gitorious and Redmine is pretty simple. I wrote a script that unhashes the Gitorious paths. They are saved in the file system hashed when you use Gitorious so linking those repositories to Redmine would be a bit complex otherwise. My script makes links to those repositories in a much more readable format so linking them to Redmine is really simple, and only required once when you create the project. You can find the script here.

Basically you don't need to worry about the integration a lot since Redmine supports git out-of-box - sort of. Of course you need to have the git service running on the server where you "production" repositories are (those that you link to Redmine, do your automated tests etc), but this is also solved with Gitorious.

I actually wrote my Bachelor's thesis about this issue. It's already slightly outdated since both Gitorious and Redmine have developed a lot, but I could make it available if you want to read it. The thesis explains what needs to be done (some of the problems have already been solved by the two tools) and it also includes a continuous integration environment which automatically builds packages when users push changes to the repositories and puts them into a reprepro repository where testers etc. can easily download them with a web browser.

Redmine had some issues last year, especially the lack of sub-projects was a bit annoying but that has been rectified in the 0.9 version. Also the plug-ins should be tested well before taken into production use, some just don't mix well and some don't work at all (probably a clash of Redmine version vs. plug-in version). All in all, though, Redmine works pretty well and should be easily expandable to your needs. Support for Gitorious is superb, for Redmine a bit more sporadic (damn French?) but both tools have large enough user bases that they should be safe bets.

Git is a very good version control tool especially for agile teams. It takes some learning and you should write a guide on how to use it for your developers to get the most out of it, but once you learn it, it's extremely productive. We wrote our own which just states the normal working process. Branching, merging etc. should be explained, for instance working on your personal repository's master branch is not such a good idea. Always create a branch and work there. When you pull changes to your master branch from some other repository, it's easier to handle the merging this way - and you won't accidentally push something you didn't mean to.

这篇关于Redmine& Git集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 12:40