Branches and remotes
Branches and remotes
3 min read
This area explains everything involving branches, tags and remotes: creating and switching branches, combining branches, bringing in and sending commits and taking care of the repository's remotes.
- The repository bar (above the graph): the
repository › branchpath and the Pull, Push, Sync, Fetch, Branch, Stash and Pop buttons. Pull and Push show, in a badge, how many commits the current branch is behind or ahead of its upstream. The arrows next to Pull and Push open each one's options. - The left panel: the LOCAL (local branches), REMOTE (remotes and each one's branches) and TAGS sections. The panel's filter (Ctrl+Alt+F) finds a branch by name.
- The graph: the branch and tag labels on each commit. Right-clicking a label opens the same menu as in the panel.
- The palette (Ctrl+P): the "Fetch", "Pull", "Push", "Force push…", "Create branch…", "Check out branch…", "Add remote…" and "Sync: pull, then push" commands, plus every branch and tag by name.
Fetch, pull, push and clone show, on the bar, git's phase ("Counting objects", "Receiving objects", "Writing objects"…), the percentage and the Cancel button.
When git needs a credential that isn't registered, Versora asks in a dialog:
- Username: "Enter the username for gitlab.exemplo.com";
- Password: "Enter the password (or access token) for gitlab.exemplo.com", in the Password or token field;
- SSH key passphrase and Confirm SSH server, for SSH remotes (see SSH keys).
To avoid typing, register a token per server in Git servers.
Creating, renaming and deleting local branches, checkout, merge, rebase, pull and creating or deleting local tags go into Ctrl+Z. A merge, rebase or pull that stopped at a conflict goes in as a whole when you finish it. What changes the server (push, force push, deleting a branch or a tag on the remote, publishing the repository) isn't undone by Ctrl+Z. See Undo.
| Page | What it covers |
|---|---|
| Create, rename and delete branches | creating from any point, renaming, deleting locally, on the remote or both, copying the name and links |
| Checkout | switching branches, checking out a remote branch (create, fast-forward, diverged), detached HEAD |
| Merge, squash merge and rebase | combining branches, local squash merge, rebase, conflict prediction |
| Dragging branches | fast-forward, merge, rebase and push by dragging one branch onto another |
| Fetch and automatic fetch | getting what's new from the remotes, from all of them or one |
| Pull and pull modes | the three modes, pulling another branch without checkout |
| Push and publishing a branch | push, publishing a new branch, pushing another branch, checks before the push |
| Force push | --force-with-lease and --force-if-includes, confirmation |
| Sync | pull, then push, in one click |
| Autostash | putting away and giving back the changes on pull, Sync and checkout |
| Skip hooks | push, pull, merge and rebase without hooks, "Try without hooks" |
| Upstream | the tracked remote branch, ↑/↓, "no upstream" |
| Tags | creating, pushing, deleting and finding tags |
| Remotes | adding, editing and removing remotes |
| Publish repository | creating the project on GitLab or GitHub and doing the first push |
- Cleaning up, archiving and reviewing branches, flow presets and Gitflow: Hygiene and flow.
- Fetch, pull, push and creating a branch in several projects at once, from Home: Getting started.
- Hiding, solo, pinning to the left and branch filters in the graph: Graph.
- Branch stacks (stacked merge requests): Stacks.
- Merge requests: Merge requests.
- Proxy and certificates used by git: Network and updates.