Skip to content

alicecola31/android-repo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 

Repository files navigation

About Marakana Android Repo

This git repository aggregates other Marakana Android-related git repositories using Google’s repo tool and the manifest file.

Specifically, this tool clones Marakana Android courseware repo as well as various Android code project repos into the following directories:

  • courseware/

    • code → ../code/

    • device → ../device/

  • code/

  • device/

Getting Started

  1. Install the repo tool:

    $ mkdir -p ~/bin
    $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
    $ chmod +x ~/bin/repo
  2. Set up a working directory (e.g. android/):

    $ mkdir -p android
  3. Change to this directory:

    cd android
  4. Initialize repo:

    $ repo init -u git@github.com:marakana/android-repo.git
  5. Pull the files:

    $ repo sync
  6. Switch all projects to the master branch:

    $ repo start master --all

Using

Updating the working tree to the latest revision

  1. Sync first

    $ repo sync
  2. Switch any newly added projects to the master branch:

    $ repo start master --all

Checking for local changes

$ repo status

Committing and publishing changes

To commit and push local changes upstream, change into the nested git repository where you’ve made changes (e.g. to courseware/) and use normal git commands:

  1. Change to the project’s directory:

    $ cd /path/to/android/courseware
  2. Stage the changed file:

    $ git add new-or-modified-file.asc
  3. Commit:

    $ git commit -m "some change"
  4. Push:

    $ git push

Adding new Git repos

To add a new project to repo, do the following:

  1. Get to the manifest directory:

    $ cd .repo/manifests/
  2. Make sure that you are on the master branch:

    $ git checkout -b master
  3. Register your project (e.g. a demo app) as a new entry in the default.xml manifest file:

        <project path="code/MyDemo" name="MyDemo" />
    Note
    The path attribute of <project .../> refers to the local directory name for our project where as the name attribute refers to the remote git repository name (relative to the parent of this repository).
    Tip
    See manifest-format.txt for more info on the syntax of this manifest file.
  4. Commit your changes

    $ git commit -m "Added a new project (MyDemo)" default.xml
  5. Push your changes upstream

    $ git push
  6. Test by syncing your main repo tree:

    $ cd -
    $ repo sync

About

Marakana Android Repo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published