Clone button could offer branch checkout command to match currently selected branch in UI

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Release notes

Problem to solve

A user might reasonably expect that when clicking the 'clone' command when viewing a repository in GitLab, the clone will take them to the same branch they currently have selected in the GitLab UI.

This is not the case, in part because the clone command is trying to accommodate any possible git client/cli/ide that it might be pasted into.

However, this can throw off a new user.

Proposal

It would be relatively straightforward to add an additional clipboard command to the clone button drop down, which also includes the fetch/checkout command for switching to the appropriate branch.

Screen_Shot_2022-10-13_at_3.21.38_PM

Intended users

Who will use this feature? If known, include any of the following: types of users (e.g. Developer), personas, or specific company roles (e.g. Release Manager). It's okay to write "Unknown" and fill this field in later.

Feature Usage Metrics

Clicks on the new clipboard command could be tracked with analytics to validate the value of the feature.

Edited by 🤖 GitLab Bot 🤖