# Is there a mercurial or git repository to download FreeBSD sources?



## mamalos (Sep 18, 2012)

...instead of using cvsup or svn?


----------



## mamalos (Sep 18, 2012)

...thought so...

thanx!


----------



## ManaHime (Sep 18, 2012)

As far as I know, cvs is going to be deprecated at some point.

Also, I have no idea how up to date this is or anything but you could always try https://github.com/freebsd/freebsd


----------



## funky (Sep 18, 2012)

mamalos said:
			
		

> ...instead of using cvsup or svn?


If you want the source to be in a git repository, you could use git-svn:

```
$ cd /usr/src/
$ git svn init svn://svn.freebsd.org/base/stable/9
$ git svn fetch -rXXXXXX
```
where the option -rXXXXXX tells git-svn to fetch the complete history beginning from revision XXXXXX, the current revision of /base/stable/9 is 240670 (so, don't set this value to small, otherwise the initial fetch will take forever). You can then subsequently update the repository with the git-svn analog to svn update:

```
$ git svn rebase
```


----------



## mamalos (Sep 19, 2012)

Thanx all for your answers,

@funky, apart from devel/svn2git (which is the port that I suppose you are talking about), there is a similar port for mercurial as well, devel/hgsvn.

Thanx again!


----------



## funky (Sep 19, 2012)

mamalos said:
			
		

> Thanx all for your answers,
> 
> @funky, apart from devel/svn2git (which is the port that I suppose you are talking about), there is a similar port for mercurial as well, devel/hgsvn.
> 
> Thanx again!


No, I ment the /devel/git-subversion port. Though, as far as I understand svn2git, it is similar to a git svn fetch of the full history.


----------

