Repository : ssh://git@open-mesh.org/doc
On branches: backup-redmine/2017-07-13,master
commit 463b5eb2eecc34559c3e580a0dedaef89f5ae5ed Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Oct 25 01:53:50 2009 +0000
doc: open-mesh/UsingBatmanGit
463b5eb2eecc34559c3e580a0dedaef89f5ae5ed open-mesh/UsingBatmanGit.textile | 103 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+)
diff --git a/open-mesh/UsingBatmanGit.textile b/open-mesh/UsingBatmanGit.textile new file mode 100644 index 00000000..ccae0649 --- /dev/null +++ b/open-mesh/UsingBatmanGit.textile @@ -0,0 +1,103 @@ + += Using the batman git repository = + +If you want to find out why we also have a git repository now, please read [wiki:BatmanGoesMainline here]. + +=== Checkout === + +To retrieve the latest changes you can pull from the read-only http frontend.[[BR]] +Your are about to download 300MB of sources - that may take a while! + +{{{ +git clone http://git.open-mesh.org/batman-adv/ batman-adv-git +}}} + +=== Branches === + +The git repository is divided into several branches to make working easier.[[BR]] + +'''master branch''' + +The master branch is a clone of the batman kernel module SVN found at [[BR]] +http://downloads.open-mesh.org/svn/batman/trunk/batman-adv-kernelland/ [[BR]] + +The idea is that all kernel changes are built on top of the SVN, so that[[BR]] +changes which affect all branches can easily trickle down. A post-commit[[BR]] +script makes sure that the SVN is in sync with the git master branch all the[[BR]] +time.[[BR]] + +In fact you will never work with this branch itself but one of the other branches.[[BR]] + +'''linux branch''' + +The linux branch is a clone of Linus Torvalds developer branch. With the help[[BR]] +of some git vodoo the master branch is merged with this branch in the folder:[[BR]] +drivers/staging/batman-adv/. If you wish to merge the latest master branch [[BR]] +changes into the linux branch you need to switch to the linux branch:[[BR]] + +{{{ +git checkout linux +}}} + +and merge the master branch into this one: + +{{{ +git fetch origin +git merge -s subtree origin/master +}}} + +If you wish to pull Linus latest changes and merge it you need to add the remote[[BR]] +branch first (you can omit that step if you already have it). + +{{{ +git remote add torvalds git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git +}}} + +Fetch its content and merge it: + +{{{ +git checkout linux +git fetch torvalds +git merge torvalds/master +}}} + +To upload your changes you need to run: +{{{ +git checkout linux +git push origin linux +}}} + + +'''difference between SVN and git''' + +If you need to see the difference between the SVN repos and the batman-adv[[BR]] +driver in drivers/staging/batman-adv/ you can run this command: + +{{{ +git diff origin/master: linux:drivers/staging/batman-adv/ +}}} + + +'''adding a branch''' + +In case you want to add your own branch for testing purposes or simply wish[[BR]] +to understand the magic. + +{{{ +git remote add $remote_name $git_url +git fetch $remote_name + +git checkout -b $new_branch_name $remote_name/master +git merge -s ours --no-commit master +git read-tree --prefix=drivers/staging/batman-adv/ -u master +git commit -m "Add batman-adv to my new branch" +}}} + +=== TODO === + +We maintain a TODO file in the git repository that you can see here: + +[[Include(http://git.open-mesh.org/TODO.html)]] + +If you are interested in helping us out you can grab one item, make a patch[[BR]] +and send it to our [wiki:MailingList Mailinglist].