Bitcoin Forum
May 10, 2024, 09:28:36 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: HOWTO: create git mirror of SVN repo  (Read 9158 times)
jgarzik (OP)
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1091


View Profile
July 31, 2010, 11:01:19 PM
 #1

It seems like a lot of people out there are using git to follow the bitcoin SVN repo, and some are having trouble with line endings.

Here is the method of creating a local git repository, containing nothing but satoshi's upstream SVN commits:
Code:
$ git svn clone --stdlayout https://bitcoin.svn.sourceforge.net/svnroot/bitcoin

When satoshi updates his SVN, here is the method for updating your local repository:
Code:
$ git svn fetch && git pull . refs/remotes/trunk

It is advisable to maintain a vanilla repository or branch, and do your work in a separate repo, such as
Code:
$ git clone bitcoin bitcoin.jg-hacks

or create a side branch,
Code:
$ cd bitcoin
$ git checkout -b jg-hacks master

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!