Batphone Git repository

The batphone repository contains the source code and technical documentation of the Android component of the Serval Mesh app.

All work on the Batphone source code is done in a Git clone of the repository onto a developer's workstation (laptop), just as for all source code controlled using Git.

The Batphone repository includes the Serval DNA repository as a Git submodule, so whenever a clone is created or updated, the Serval DNA repository is also cloned or updated automatically.

To create a new clone from scratch

$ git clone --quiet git@github.com:servalproject/batphone.git
$ cd batphone
$ git submodule --quiet update --init
$ ls
aa                   COPYING             jni                 res
AndroidManifest.xml  CURRENT-RELEASE.md  LICENSE.TXT         servald-gdb
ant.properties       data                PRIVACY.md          src
art                  doc                 proguard.cfg        testdefs.sh
assets               gdbserver           project.properties  tests
build.sh             git                 README.md
build.xml            GPLV3.TXT           reinstall
CONTRIBUTORS.md      INSTALL.md          reinstall-debug
$

To update an existing clone

$ cd batphone
$ git fetch --prune --tags --quiet
$ git submodule --quiet update
$
  • The --prune option causes branches that have been deleted from GitHub to be deleted from the clone. This prevents old branches from accumulating in the clone.
  • The --tags option ensures that all tags are fetched from GitHub.

Note: The above command does not update any local branches to track the GitHub branches. In particular, it does not update the working (checked out) branch. The commands and techniques for working with branches is an entire chapter in any Git book.

Note: The above command may leave the Serval DNA submodule in “detached head” state. This will not affect you unless you perform software development on the files in this clone's submodule.


Login