tags:

views:

82

answers:

1

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).

A: 

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.

refack