git fetch only for current branch

I know that I can fetch any remote branch to any local branch, but is there also some kind of shortcut to fetch just from the tracked remote branch to the current tracking local branch (without the need to specify the local and remote branch names explicitly)?

Motivation: I want to just fetch remote changes for the current branch to avoid getting (maybe large) changes from currently irrelevant branches. I will merge/rebase later in a separate step.

  • Git Pull Doesn't Do A Git Fetch
  • Git Remote Repository Check-Out Problem
  • Git Giving “fetch first” error when trying to push
  • What does it mean to fetch from a clone that is not a remote?
  • git fetch doesn't fetch all branches
  • Is there a git command that can resolve an error: remote branch 'refs/heads/foo/bar' not found?
  • libssh2.dll is missing when trying to push to github
  • Git workflow - Merge master before or after pushing to public repo?
  • Git: Find last edits from a specific user in a specific file
  • How to update my git working copy to a previous revision
  • Gitorious Rots Ruby on Rails Error
  • could not read Username for 'https://github.com': No such device or address
  • 4 Solutions collect form web for “git fetch only for current branch”

    Let’s assume that you have origin remote with master, develop branches.
    You want to sync master but not develop.

    You can do the following steps:

    git fetch origin
    git merge origin/master
    

    UPDATE: in case of only branch have to be fetched:

    git fetch origin master
    git merge FETCH_HEAD
    
    git fetch $(git rev-parse --symbolic-full-name --abbrev-ref @{upstream} | sed 's!/! !')
    

    Per https://stackoverflow.com/a/12142066/25192 – you can use this to find the name of the current branch:


    git rev-parse --abbrev-ref HEAD

    …then substitute this into the fetch command as the refspec.

    Git is a decentralized VCS. Whe you do a fetch, you’re synch’ing the two repositories entirely. Branches aren’t nothing but labels attached on specific commits. I guess you mean git fetch which doesn’t do any merges or stuff like that to any particular branches.

    http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html

    Git Baby is a git and github fan, let's start git clone.