Single Branch SetupIf you want to checkout only one single branch, here's what you would do: Here's how you as a developer get your local git repository if you only want trunk (git-1.5.2): git-svn clone -r16500:HEAD svn+ssh://USERNAME@svn.gnucash.org/repo/gnucash/trunk That's it. The revision subset r16500:HEAD will download approx. 30-40 MB of data. If you download larger revision spans, the download amount might go up into the hundreds of MBs. Here's how you run the equivalent of "svn update": git-svn rebase That's it. Once you committed your changes to your local git repository, here's how you commit the local changes upstream into gnucash's SVN repository: git-svn dcommit An introduction to git-svn for Subversion/SVK users and deserters
utsl.gen.nz/talks/git-svn/intro.html#howto-fetch ...make changes to your local branchOnce you have some edits you want to commit, you can use git-commit to commit them. Nothing (not even file changes) gets committed by default; you'll probably find yourself using git-commit -a to get similar semantics to svn commit. This is because git has a powerful concept of a staging area, called the index, which is where you can prepare your changes before you actually save the commit. $ vi CREDITS $ git commit -a committed tree 6b513546099f01826c5cc7bc25042d00bc2560b0 $ An introduction to git-svn for Subversion/SVK users and deserters
utsl.gen.nz/talks/git-svn/intro.html#howto-fetch ..by checking out just the trunk from SVNIt is probably second fastest to just check out the SVN head using git-svn; this is a bit like setting up a mirror path with svk mirror, then syncing only to the head revision using svk sync -s NNN (where NNN is the head revision, found below using svn log): $ svn log https://svn.perl.org/parrot/trunk|head ------------------------------------------------------------------------ r17048 | bernhard | 2007-02-19 07:32:13 +1300 (Mon, 19 Feb 2007) | 3 lines Remove the PIR.pg and bc.pg examples as they are now covered by languages/abc and languages/PIR. ------------------------------------------------------------------------ r17047 | bernhard | 2007-02-19 07:09:00 +1300 (Mon, 19 Feb 2007) | 5 lines [languages/PIR] $ mkdir parrot $ cd parrot $ git svn init https://svn.perl.org/parrot/trunk Initialized empty Git repository in .git/ git-svn Using higher level of URL: https://svn.perl.org/parrot/trunk => https://svn.perl.org/parrot $ git-svn fetch -r17048 A DEPRECATED.pod A debian/libparrot-dev.install A debian/parrot-doc.install ... A examples/streams/ParrotIO.pir A examples/streams/Include.pir A examples/streams/Filter.pir r17048 = a57c09abef48d73f3c74c6a307793301b5956bfd (git-svn) Checking files out... 100% (2959/2959) done Checked out HEAD: https://svn.perl.org/parrot/trunk r17048 $ In these days I’ve heard lot of rumors around Git. After reading some manual/tutorial/guide I discovered that it can be really useful, especially if you spend lot of time coding off-line (that’s my situation). This is a really small howto that describes how to work on a project versioned with svn (maybe taken from KDE repository
What’re the advantages?Since Git is a distributed revision control system (while svn is a centralized one) you can perform commits, brances, merges,… on your local working dir without being connected to internet. Next time you’ll be online, you will be able to “push” your changes back to the central svn server. Steps to follow:You’ve to:
Now you’ll be able to work on your project using git as revision control system. To keep update your working copy just perform:
You can commit your changes to the svn server using the command:
In this way each commit made with git will be “transformed” into a svn one. Solve git-svn rebase problemsWhile adding new cool features to your program, you may experiment some problem when synchronizing with the main development tree. In fact you have to commit all local modifications (using the Sometimes it isn’t reasonable since your changes are not yet ready to be committed (you haven’t finished/tested/improved your work). But don’t worry, git has a native solution also for this problem, just follow these steps:
After the first step all your uncommitted changes will disappear from the working copy, so you’ll be able to perform the rebase command without problems. For further informations read That’s all. |