Basically I'm looking for the Sublime Merge equivalent of the two following CLI commands:
# Reset "feature" to "origin/feature" without checkout
git branch -f feature origin/feature
# Checkout the now up-to-date feature branch
git checkout feature
When I right click a remote branch in the graph view, there's this option:
This option is very convenient - it creates a branch named
origin/feature and it performs a checkout of that branch automatically.
However, if a corresponding
feature branch tracking
origin/feature branch already exists (out of sync with the remote branch, some commits behind), this option doesn't appear anymore.
This means that in order to work on the latest version of
feature, I have to look around the graph view, find the local
feature branch which is several commits behind, check it out (which inconveniently changes my work-tree to some old version, potentially interfering with IDE's), then merge/reset it to sync it with the up-to-date
Another option I have is to delete the local
feature branch and then use the option pictured above, but that's a bit awkward.
The Git Extensions client has the following checkbox when you try to checkout a remote branch, which is exactly what I'm looking for:
[x] Reset local branch with the name: 'feature'
(it resets the local branch and immediately checks it out meaning you go straight to the up-to-date commit)
Is there anything similar to this in Sublime Merge?