Skip to content

Remote branches can be checked out using double-click.

Closes #293 (closed)

This MR adds support for checking out remote branches by double-clicking the branch name or via the context menu.

Screenshot_from_2020-06-10_18-45-49

When checking out remote branch, the following dialog is presented.

Screenshot_from_2020-06-10_18-37-31

The local branch name is pre-filled from the selected remote branch. The drop-down lists all remote branches prefixed with the remote name. Symbolic references are not listed.

Screenshot_from_2020-06-10_18-48-14

The checkbox controls whether the local branch will track the remote branch.

When the Checkout button is clicked, a local branch is created as follows:

  1. Commit to which the remote reference points to is looked up.
  2. A new local branch is created with the given name.
  3. If tracking was requested, upstream branch is set.

The above steps are done asynchronously.

Finally, the new branch is checked out.

Screenshot_from_2020-06-10_18-51-58

We can see the that the tracking has been set up correctly, using a command line:

$ git branch -vv
  checkout-remote-branches 4eb9a4cb [origin/checkout-remote-branches] Remote branches can be checked out using double-click.
* gnome-3-32               b4c8155f [origin/gnome-3-32] Add Malay translation
  master                   c27bf1c0 [origin/master] Updated Spanish translation
Edited by Armandas Jarušauskas

Merge request reports