Index

Importing a project manually

To import a project into Pocket Git, start by pressing the action button in the initial activity.

After that, choose a name for your project.

The repository URL can either use the SSH protocol, for example git@github.com:user/project.git, or the HTTP protocol, for example https://github.com/user/project.git.

The local path is the directory where the project will be created. You can choose it using the included directory selector. You can choose the initial directory for your projects in the settings.

You can then choose three different forms of authentication: none, password and private key.

None means you will be an anonymous user with little privileges.

Picking password, you will have to set a username, and optionally a password. Leaving the password field empty will make Pocket Git ask for it when needed.

Picking private key will allow you to select the path of your private key. If the private key is passphrase protected, Pocket Git will ask for the passphrase when needed.

When you're ready, press the save icon to save your new project. You will need to clone it first before using it.

Importing from github or bitbucket

If your project is hosted by github or bitbucket, you will simply have to use your browser to navigate to your project's github or bitbucket home. From there, share the page with Pocket Git. After that, you will be able to select between the HTTP and SSH protocols.

Every field will be automatically filled except for the authentication.

Sharing a github or bitbucket link for a project already imported will open the project or offer to clone the project instead.

Cloning a project

A project that isn't already cloned will have a clone icon next to it. Pressing the project will initiate a clone. If the local path isn't empty, you will be prompted before its contents are deleted.

As the clone progresses, you will be able to see a notification informing you of the current state of the cloning:

Project hasn't been cloned yet. Press it to clone it.

Project is already cloned. Press it to enter it.

Project is being cloned. You can follow its progress in a status bar notification.

Project failed to clone. Press it to try cloning again.

Editing a file

After opening a project, you will see a list of files. You can navigate in the directory tree by pressing the directory names.

To open a file for editing, simply press that file's name. You will be presented with a list of applications that can edit that file. We recommend you give DroidEdit a try ;-)

If changes to the file are saved, you will notice that the status of that icon changed. That means that the file as uncommitted changes. Before committing those changes, the file needs to be staged.

Staging changes

After changing a file, you need to stage the change before committing it. To do this, first do a long press on the file name until the action mode bar appears. Then select the stage icon.

The possible action icons in the action mode bar are the following:

Stage a file change.
The equivalent to git add <file>.

Unstage a file.
The equivalent to git reset HEAD <file>.

Remove a file.
The equivalent to git rm <file>.

Delete a file.
The equivalent to rm <file>.

Revert a file.
The equivalent to git checkout <file>.

Compare a modified file with the head revision.
The equivalent to git diff HEAD <file>.

File status icons

Files have different icons in front of them indicating their current status:

File is committed.

File has been modified but not yet staged.

File has been modified and staged.

File has been modified, staged and then modified again. Some modification are staged and others are not.

File is untracked.

File was untracked and has been added to the staging area.

File has been removed from the index.

File is tracked but is missing from the working directory.

File is ignored as per the .gitignore file.

File has conflicts.

Committing

To commit staged changes, just press the commit action button. This button only appears when there are staged changes to commit.

If you haven't done it already, Pocket Git will ask for your author name and email.

In the commit dialog, verify which files are being committed and type your commit message. When finished, press commit to commit your changes.

The equivalent to git commit -m <message>.

Pushing and Pulling

To push or pull your changes into the remote repository, just press the remotes icon and then select the desired operation (pull or push).

By selecting push, commited changes are sent to the remote repository. At the moment it isn't possible to select another remote or refspec. Managing remotes and refspecs will be added to Pocket Git in a future update.

The equivalent to git push.

By selecting pull, changes from the remote repository are incorporated into the current branch. At the moment it isn't possible to select another remote or refspec. Managing remotes and refspecs will be added to Pocket Git in a future update.

The equivalent to git pull.

Both commands initialize a notification to track the command progress.

Checkout branches

To checkout other branches, simply swipe from the left of the screen to reveal the branch navigation drawer.

In the top of the drawer, a switch allows you to change between local and remote branches.

Pressing on a local branch will checkout that branch.

The equivalent to git checkout <branch>.

Pressing on a remote branch, you will be asked for the name of the local branch to be created. The remote branch will then be checked out into this new branch.

The equivalent to git checkout -b <branch> --track <remote>/<branch>.

Merging branches

To merge two branches, first checkout the branch you want to merge into.

Then, press the branches icon in the menu and select the merge branch option.

A list will appear where you can choose the branch you want to merge. After choosing the branch the merge will be done.

The equivalent to git merge <branch>.

Creating branches

To create a branch, first make sure you checkout the branch you want your new branch to be based on.

Then press the branches icon and select the create branch option.

A dialog asking for the new branch name will appear. Enter your new branch name and press create. A new branch will be created.

The equivalent to git checkout -b <branch>.

Removing branches

To remove a branch, first make sure you haven't that branch checked out.

Then press the branches icon and select the delete branch option.

The equivalent to git branch -d <branch>.

Reverting changes

To revert a change to just some files, start by selecting them using long press on a file name to initiate a selection.

After the action mode bar appears, just press the revert icon to revert the selected files to their previous version.

The equivalent to git checkout <file>

To revert the whole repository to the previous version, press the branches icon and select the revert option. The whole repository will be reverted to the previous version.

The equivalent to git reset --hard HEAD

Viewing the graphical log

To view the graphical log just select the log option in the menu.

Inspecting a commit

When viewing the graphical log, you can click on a specific commit to further inspect it.

When inspecting a commit you will be able to see commit information, the complete commit message as well as the list of files modified in that commit.

Checking out a commit

When inspecting a commit, you can press the checkout icon to checkout that specific commit.

The equivalent to git checkout <commit>

Seeing a diff

When inspecting a commit you will be able to press a changed file's name to see the differences introduced by that specific commit.

When a single modified file is selected, you can press the differences icon to compare the file with the HEAD version.

In the commit dialog, pressing a staged file allows you to compare the file with the HEAD version.