Git usage: Difference between revisions
>Theuni No edit summary |
>Theuni No edit summary |
||
Line 11: | Line 11: | ||
== Sync with SVN For dcommit == | == Sync with SVN For dcommit == | ||
'''The following is ONLY useful if you have svn commit access. | '''The following is ONLY useful if you have svn commit access. Everyone else should stop here.''' | ||
<source lang="bash"> | <source lang="bash"> | ||
$ cd xbmc | $ cd xbmc |
Revision as of 21:35, 19 October 2009
There's now a git repository available for XBMC. This page is intended as an instructional page showing how to clone the XBMC git repository along with notes on how to start fetching newer revisions through XBMC's svn repository.
Eventually, the git repository will be the main repository for development. Currently, the git repository is synced with changes made to the svn repository every four minutes.
First thing, clone the repo.
$ git clone git://xbmc.git.sourceforge.net/gitroot/xbmc/xbmc
After cloning the repo, you may notice a lot of branches that are no longer in the svn repo, and also branches and tags which are appended with '@' followed by some number. These are all the branches and tags git-svn found when doing the initial import from the svn repo. If you do not intend to track svn, you may proceed to delete these stale branches, otherwise, you should keep them so that the time to do an initial fetch with git-svn doesn't take days (that's right, DAYS).
Sync with SVN For dcommit
The following is ONLY useful if you have svn commit access. Everyone else should stop here.
$ cd xbmc $ git svn init --stdlayout --prefix=origin/ https://xbmc.svn.sourceforge.net/svnroot/xbmc $ git config svn-remote.svn.tags tags/*:refs/tags/* $ git config --unset remote.origin.url
NOTE: Don't forget the trailing '/' for the prefix option in 'git svn init'.
Now do the fetch. If you left all branches and tags that were cloned alone, this should take roughly half an hour, as opposed to several days.
$ git svn fetch
Once finished, you should be at the master branch which tracks 'trunk' from svn. You can check by doing a dry-run of a check in to svn, via the dcommit command from git-svn.
$ git svn rebase $ git svn dcommit -n Committing to https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk ...
NOTE: Don't forget the '-n' option to perform a dry-run, otherwise it will try to perform an actual check in.
That's basically all there is to it. To keep following svn for new revisions, it's simply fetching new changes again and rebasing.
$ git svn fetch && git svn rebase
Other Repos
There are also other repos that are kept in sync with new changes from the svn repository.
A repository is available at github.
git://github.com/ceros/xbmc.git