使用git客户端和SVN存储库的最佳工具/方法 [英] Best tooling/methodology to work with a git client and an SVN repository

查看:121
本文介绍了使用git客户端和SVN存储库的最佳工具/方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在使用SVN大约两年了(主要通过TortoiseSVN和IntelliJ),并且尝试了git(主要通过TortoiseGIT ...在这里检测一个模式?)

我们公司正在使用SVN作为存储库,他们没有想到很快就会切换。什么是建议的最佳实践和工具来使用本地git和远程SVN服务器?

正如你现在可能收集的,我更喜欢一个简单的shell扩展/ IDE GUI到命令行工具。另外,我正在使用Windows(请参阅此相关但过时的问题

我可以提出两个选择:

1)同时使用TortoiseGit和TortoiseSVN

检出SVN服务器上的工作副本,而不是将其提交到本地git仓库。使用Git作为本地历史记录跟踪器,并以较低的粒度向SVN进行提交。
通过这种方法,您可以获得两个世界的最佳工具,但您需要兼顾两个工具和两条历史线。



rember将.svn添加到.gitignore和.git到svn:ignore

2)仅使用TortoiseGit



其中包含GUI快捷方式:


  • git svn clone又名svn checkout svn update - 叫做rebase

  • git svn dcommitakasvn commit



这是一个比较常规的选项,但git-svn是一个非常基础的svn客户端。



请记住,dcommit将会提交自上次dcommit以来的一系列本地提交作为svn commit的一个系列,因此不是整体原子。


I've used SVN for about two years now (mostly via TortoiseSVN and IntelliJ), and experimented with git (mostly via TortoiseGIT ... detect a pattern here?)

Our company is using SVN for the repository, and they're not thinking of switching any time soon. What is the recommended best practices and tooling to use git locally and work with the remote SVN server?

As you probably gathered by now, I prefer a simple shell-extension/IDE GUI to command line tools. Also, I'm working on Windows (see this related yet outdated question).

解决方案

I can suggest two options:

1) Using both TortoiseGit and TortoiseSVN in parallel

Checking out your working copy from your SVN server than commiting it to a local git repos. Using Git as a local history tracker, and commiting to SVN with lower granularity. With this approach you get the best tooling of both worlds, but you need to juggle two tools, and two history lines.

rember to add .svn to .gitignore, and .git to svn:ignore

2) Using only TortoiseGit

Which has GUI shortcuts to:

  • "git svn clone" a.k.a "svn checkout"
  • "git svn fetch" a.k.a "svn update" - called rebase
  • "git svn dcommit" a.k.a "svn commit"

This is a more conventional option, but git-svn is a very rudimentary svn client.

Keep in mind that dcommit will commit the series of local commits since your last dcommit as a series to svn commit, and hence is not atomic as a whole.

这篇关于使用git客户端和SVN存储库的最佳工具/方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆