placeholderGit for Android

Git for Android

Use MGit as a Git client on Android, including installation, cloning, local repositories, URL formats, and SSH key setup.

Download

  1. Search for Mgit in F-Droid, then download and install it. It is also available in the Play Store, but some features do not work properly there.
  2. Choose a suitable release from the GitHub repository.

Quick Start

Clone a remote repository

  • Click on the + icon to add a new repository
  • Enter remote URL see URL format below
  • Enter local repository name - note that this is not the full path, as MGit stores all repositories in the same local directory (can be changed in MGit settings)
  • Click the Clone button
  • If required, you will be prompted for credentials to connect to the remote repo. MGit will download the repository (all branches) to your device

Create a local repository

  • Click on the + icon to add a new repository
  • Click on Init Local to create a local repository
  • Enter the name for this repository when prompted
  • A local empty repo will be created

URL format

SSH URLs
SSH running on standard port (22): ssh://username@server_name/path/to/repo
SSH running on non-standard port: ssh://username@server_name:port/path/to/repo
username is needed - by default, MGit tries to connect as root.
HTTP(S) URLs
HTTP(S) URL: https://server_name/path/to/repo

SSH

MGit App
Settings -> SSH Keys -> + icon -> input NewFileName -> Generate Key -> Open File and Copy the content
GitHub
Settings/keys
New SSH Key -> input Title -> Paste the content