Appearance
Branches
The Git mode's sidebar toolbar starts with the branch picker, showing the branch you are on. Tap it for the Branches sheet.
The branch picker
- Local branches. Tap one to switch. The current one is marked Checked out.
- Remote branches. Branches you have fetched but never checked out. Tap Check out to create a local branch that tracks it.
- Branches not fetched yet. Branches the remote has that this clone holds nothing of, which is most of them after a single-branch clone. Tap Fetch to bring one down; it then moves up a section.
The History mode has its own picker, Branches & Tags, which browses a branch or tag without switching to it.
Create a branch
Tap the new-branch button on the toolbar. Give it a Branch name; Checkout after create switches to it, and Track upstream sets the remote as its upstream so its first push has somewhere to go. A name that is already a tag is warned about, because git would read the bare name as the tag.
Switching with uncommitted work
Uncommitted changes come along when you switch, as they do with git switch. The switch is refused only when a file you have changed is also changed by the branch you are going to. When that happens the app opens Switch to … with the files in the way under Changed on both sides and three ways out:
- Deal with each file: Unstage, Discard, Restore or Delete on its row. When none are left the screen says so and the switch goes ahead.
- Shelve your changes… takes all of your changes onto the shelf, where they wait for you to apply them on whichever branch you like.
- Go back and commit first.
There is no "switch anyway". The other refusals name themselves: conflicted files still unresolved, a branch name already taken by a different local branch, a branch not fetched yet.
Delete a branch
In the picker, each branch row carries a delete glyph, except the current branch, a branch not fetched yet, and every row in a read-only project. Deleting a local branch removes the branch only; the remote is untouched. Deleting a remote branch under Remote branches removes your copy of it, and a fetch brings it back; while a local branch of the same name exists, the app asks you to delete that one first. Tags delete the same way from the History picker: the tag goes locally, and the next Push carries the deletion to the remote.
The picker's search matches as every list does, a / reaching into the branch's folder — fe/fb finds feature/foo-bar; see Searching lists.
There is no review before a branch delete, and no count of what becomes unreachable. Look at the branch in the History mode first if you are unsure.
Tags
Create a tag from a commit's details in the History mode with Create tag at this commit. Tags are published and fetched from the Tags rows of the push and fetch hubs; see Push and fetch.
Not offered
Renaming a branch, and reverting a commit, are not in the app yet. Both are on the list.
