开发者

Best tooling/methodology to work with a git client and an SVN repository

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜