Sublime Forum

Feature request: single branch operations

#1
  1. Ability to pull only tracked branch. (git pull origin branch)

  2. Ability to fetch single branch by “branch_name”. (git fetch origin branch_name)

0 Likes

#2

This may not be at all what you’re looking for, but if you routinely only care about 1-2 branches or certain branch patterns, you can configure Git to only update those.

0 Likes

#3

Create %APPDATA%\Sublime Merge\Packages\User\Branch.sublime-menu and add the following lines. Fetch and Pull options will now be available as branch context menu.

[
    {
        "caption": "Fetch $branch",
        "command": "git",
        "args": {"argv": ["fetch", "origin", "$branch"]}
    },
    {
        "caption": "Pull $branch",
        "command": "git",
        "args": {"argv": ["pull", "origin", "$branch"]}
    },
]
0 Likes

#4

@Augustus, git pull origin $branch can be a bit dangerous as it can result in a merge into the current branch when different, I would suggest this version of the pull menu item:

0 Likes