| Version 5 (modified by cdavid, 4 years ago) |
|---|
* This is work in progress *
Rationale for git
Comparison with bzr / hg, problems of svn.
How to do the migration
The migration from svn repository to git repository should keep as mush information from svn as possible: history, tags and branches.
Tool for the migration
svn-all-fast-export: see http://repo.or.cz/w/svn-all-fast-export.git
This is an exporter coded by KDE people to handle KDE migration - thus, it can certainly handle numpy and scipy. It can skip some branches, or paths outside the usual trunk/branches/tags (f2py-research, for example), and export svn "tags" as real tags.
usage
For numpy, the following seems to work - it ignores branches outside the /branches namespace, convert the tags.
#! create repository myproject end repository match /trunk/ repository myproject branch master end match # Ignore extra 'repositories' which are not numpy code, but were in numpy # repository. match /f2py-research/ end match match /vendor/ end match match /numpy.sunperf/ end match match /cleaned_math_config/ end match match /numpy-docs/ end match # Take usual svn branches match /branches/([^/]+)/ repository myproject branch \1 end match # This rule will create tags that don't exist in any of the # branches. It's not what you want. # See the merged-branches-tags.rules file match /tags/([^/]+)/ repository myproject branch refs/tags/\1 end match
Common scenario
Scenario 0: setting up git
Installation
Please do not use any version of git below 1.5.3.
Linux
Git is included in most linux distributions (git-core on Ubuntu).
Mac OS X
Reasonably up to date binary installers can be found here: http://code.google.com/p/git-osx-installer/.
Installing git itself from sources is easy, but installing the documentation (man, html and info) is a PITA, with many dependencies (asciidoc, etc...). So avoid it if you don't want to go through the hassle.
Windows
There are two easy ways to install git: the native installer or the cygwin installer. Unless you are a regular user of cygwin, the native installer is the best choice. It can be found there: http://code.google.com/p/msysgit/
GUI
Git has a basic TK-based GUI, called gitk. It works well to navigate the history. There are native UI for git for most platforms, including windows and mac os X:
- TortoiseGit?: http://code.google.com/p/tortoisegit/
- gitx (native mac os X client): http://gitx.frim.nl
basic configuration
At minimum, set up your name and email, so that they appear correctly for commits:
git config --global user.name "Your Name Comes Here" git config --global user.email name@domain.example.com
