Repository : ssh://git@open-mesh.org/doc
On branches: backup-redmine/2017-07-13,master
commit 00d6992d1f3446b242545abb0542b2e9d6876b9a Author: Sven Eckelmann sven@narfation.org Date: Fri Jan 21 23:57:10 2011 +0000
doc: open-mesh/UsingBatmanGit
00d6992d1f3446b242545abb0542b2e9d6876b9a open-mesh/UsingBatmanGit.textile | 138 +++++++++++++++++++++------------------ 1 file changed, 73 insertions(+), 65 deletions(-)
diff --git a/open-mesh/UsingBatmanGit.textile b/open-mesh/UsingBatmanGit.textile index 02a2d7e2..7d5dc786 100644 --- a/open-mesh/UsingBatmanGit.textile +++ b/open-mesh/UsingBatmanGit.textile @@ -1,37 +1,43 @@ -= Using the batman git repositories =
-{{{ -#!div style="width: 40em; text-align: justify" +h1. Using the batman git repositories
-If you want to find out why we also have a git repository now, please read [wiki:2009-10-23-batman-goes-mainline here].
-=== Checkout === +<pre> +<code class="div"> + +If you want to find out why we also have a git repository now, please read [[2009-10-23-batman-goes-mainline|here]]. + + +h3. Checkout +
To retrieve the latest changes you can pull from the read-only http frontend. -}}} +</code></pre>
-{{{ +<pre> git clone http://git.open-mesh.org/batman-adv.git batman-adv-git -}}} +</code></pre>
-{{{ -#!div style="width: 40em; text-align: justify" +<pre> +<code class="div">
There is also a repository for kernel integration. You are about to download 300MB of sources - that may take a while! -}}} +</code></pre>
-{{{ +<pre> git clone http://git.open-mesh.org/ecsv/linux-merge.git/ -}}} +</code></pre> + +<pre> +<code class="div">
-{{{ -#!div style="width: 40em; text-align: justify"
-=== Branches === +h3. Branches +
The main git repository is divided into several branches to make working easier.
-'''master branch''' +*master branch*
The master branch is a clone of the batman kernel module SVN found at http://downloads.open-mesh.org/svn/batman/trunk/batman-adv/
@@ -39,109 +45,111 @@ The idea is that all upcoming changes are built on top of the SVN, so that chang
In fact you will never work with this branch itself but one of the other branches.
-'''next branch''' +*next branch*
The next is a branch only maintained in git to gather bug fixes for the latest release and well tested features taken from the master branch. Cherry-pick is used to get commits from the master branch and git-am to insert patches from mailboxes.
Create branch associated with the remote-tracking branch after cloning the repository -}}} +</code></pre>
-{{{ +<pre> git checkout -b next --track origin/next -}}} +</code></pre>
Cherry-picking a commit from master branch
-{{{ +<pre> git checkout next git cherry-pick $SHA1 -}}} +</code></pre>
-{{{ -#!div style="width: 40em; text-align: justify" +<pre> +<code class="div">
-'''maint branch''' +*maint branch*
The maint is a branch only maintained in git to gather bug fixes and only bugfixes for the last release which were usually picked from next.
Create branch associated with the remote-tracking branch after cloning the repository -}}} +</code></pre>
-{{{ +<pre> git checkout -b maint --track origin/maint -}}} +</code></pre>
Cherry-picking a commit from next branch
-{{{ +<pre> git checkout maint git cherry-pick $SHA1 -}}} +</code></pre> + +<pre> +<code class="div">
-{{{ -#!div style="width: 40em; text-align: justify"
-=== Linux integration === +h3. Linux integration +
The linux-merge repository is a clone of Linus Torvalds developer branch. With the help of some git voodoo the next branch is merged with this branch in the folder: net/batman-adv/. If you wish to merge the latest next branch changes into the linux branch you need to pull the newest changes in next from the batman-adv-git repository (we assume that you created the next branch in your local linux-merge repsitory as explained above): -}}} +</code></pre>
-{{{ -git checkout next +<pre> +git checkout standalone/next git pull http://git.open-mesh.org/batman-adv.git next -}}} +</code></pre>
and merge the next branch into this one:
-{{{ -git checkout master -git merge -s subtree next -}}} +<pre> +git checkout merge/master +git merge -s subtree standalone/next +</code></pre>
-{{{ -#!div style="width: 40em; text-align: justify" +<pre> +<code class="div">
If you wish to pull Linus latest changes and merge it you need to add the remote branch first (you can omit that step if you already have it). -}}} +</code></pre>
-{{{ +<pre> git remote add torvalds git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git -}}} +</code></pre>
Fetch its content and merge it:
-{{{ -git checkout master +<pre> +git checkout merge/merge git fetch torvalds git merge torvalds/master -}}} +</code></pre>
To upload your changes you need to run: -{{{ +<pre> git push -}}} +</code></pre>
-{{{ -#!div style="width: 40em; text-align: justify" +<pre> +<code class="div">
-'''difference between next and linux-integration''' +*difference between next and linux-integration*
If you need to see the difference between the next branch and the batman-adv driver in net/batman-adv/ you can run this command: -}}} +</code></pre>
-{{{ -git diff next: linux:net/batman-adv/ -}}} +<pre> +git diff standalone/next: merge/master:net/batman-adv/ +</code></pre>
-{{{ -#!div style="width: 40em; text-align: justify" +<pre> +<code class="div">
-'''adding a branch''' +*adding a branch*
In case you want to add your own branch for testing purposes or simply wish to understand the magic. -}}} +</code></pre>
-{{{ +<pre> git remote add $remote_name $git_url git fetch $remote_name
@@ -149,4 +157,4 @@ git checkout -b $new_branch_name $remote_name/master git merge -s ours --no-commit next git read-tree --prefix=net/batman-adv/ -u next git commit -m "Add batman-adv to my new branch" -}}} +</code></pre>