sublime_merge icon indicating copy to clipboard operation
sublime_merge copied to clipboard

Allow fetching a branch and switching branches as single operation

Open AntonPetrov83 opened this issue 1 year ago • 1 comments

Problem description

Consider I want to switch branches and then pull latest changes. I do it in two operations:

  1. Switch branch
  2. Pull latest changes

In a large repository (I am in game development) with Git LFS they are two long operations. I would like it to be a single operation modifying local repo and this is possible with:

  1. git fetch origin branch:branch (fetch latest changes and upgrade local branch reference)
  2. git checkout branch (switch current branch and modify local files once)

Preferred solution

Right click remote branch, then "Fetch latest changes and checkout the branch".

Alternatives

  1. Right click remote branch, then "Fetch and update local branch".
  2. Regular right-click checkout.

AntonPetrov83 avatar Sep 24 '24 07:09 AntonPetrov83

+1; This use-case comes up all the time when "recovering" from a feature branch after merging it through a web application like GitLab, GitHub etc. My current work-around is to delete the local master and re-create it from the updated remote branch. But it takes a lot of clicking ;)

mcejp avatar Nov 17 '25 17:11 mcejp