Allow fetching a branch and switching branches as single operation
Problem description
Consider I want to switch branches and then pull latest changes. I do it in two operations:
- Switch branch
- 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:
-
git fetch origin branch:branch(fetch latest changes and upgrade local branch reference) -
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
- Right click remote branch, then "Fetch and update local branch".
- Regular right-click checkout.
+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 ;)