简体   繁体   English

git-svn可以执行此工作流程吗?

[英]Is this workflow possible with git-svn?

I'd like to be able to do the following: 我希望能够执行以下操作:

  • Create a git branch off of a remote. 创建一个远程的git分支。
  • Locally, create a new branch off of that local version of the remote. 在本地,从该远程版本创建新分支。
  • Do my dev work within that branch. 我的开发人员是否在该分支机构工作。
  • Create a pull request from that branch into the original git remote. 创建从该分支到原始git远程的拉取请求。
    • At this point, the pull request can be reviewed, giving us a bit of a code review along the way. 在这一点上,可以对请求请求进行审查,从而为我们提供了一些代码审查过程。
  • When that's okayed, pull that into the original remote. 没关系的时候,将其拉入原始遥控器。
  • From there, sync that up with my svn trunk. 从那里,将其与我的svn中继同步。

Is that possible with git-svn or something similar? git-svn或类似的东西可能吗? I know that I can do a local git repo, do my own branching and such via git-svn, but I need that remote so that others can create pull-requests and such. 我知道我可以通过git-svn做本地的git repo,做自己的分支,但是我需要那个远程,以便其他人可以创建请求请求等。 Really just wanting a good code review solution and in the past, using just git, pull requests were a great way to go. 真的只是想要一个好的代码审查解决方案,而在过去,仅使用git来完成pull请求是一个很好的方法。 Unfortunately we are using SVN at work, so we need to take that into consideration. 不幸的是,我们在工作中使用了SVN,因此我们需要考虑到这一点。

Thanks for any ideas on this :). 感谢您对此的任何想法:)。

We're going through the same thing at work right now. 我们现在正在处理同一件事。 We've looked at three approaches: 我们研究了三种方法:

  1. Home-grown setup based on the ideas in this post . 基于这篇文章中的想法的本地设置。
  2. SubGit SubGit
  3. Atlassian Stash + Subgit plugin Atlassian Stash + Subgit插件

We're already using in-house JIRA/GreenHopper instances extensively, and the first two solutions are too 'fiddly' for our liking, so we plan to try Stash + SubGit in the new year. 我们已经在广泛使用内部JIRA / GreenHopper实例,而前两个解决方案对于我们的喜好而言过于“讨喜”,因此我们计划在新的一年中尝试Stash + SubGit。 (No affiliation, just been circling around solutions to this problem for awhile, and this one looks the most promising.) (没有从属关系,只是围绕该问题的解决方案已经有一段时间了,而这个问题看起来是最有前途的。)

So, to answer your question: the work flow you describe is certainly possible with git-svn , but... it may be more trouble than it's worth unless you have a very small team (three or four developers) who are all git and svn ninjas. 因此,回答您的问题: git-svn当然可以描述您描述的工作流程,但是...除非您的团队规模很小(三到四个开发人员), 而且他们都是git svn忍者。 For our 30-person team of very mixed backgrounds and skill sets, we just weren't comfortable trying to set up a transparent git-svn bridge on our own. 对于我们的30人的团队,他们的背景和技能非常混杂,我们只是不愿意尝试自己建立透明的git-svn桥。

I think git will serve your purpose, for code reviews you dont need to push the code to the remote repo followed by a pull, you can just generate a patch. 我认为git将满足您的目的,对于代码审查,您无需将代码推送到远程回购,然后再进行拉取,您只需生成一个补丁即可。 The patch can then be sent to the code reviewer which has to just apply patch and review the code. 然后可以将patch发送到代码审查者,后者仅需apply patch并审查代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM