Search code examples
gitgit-fetch

Does git fetch pull data for all branches


If I am on a particular branch and I do a git fetch does it pull down all the data for that branch only or for all branches for that repository?


Solution

  • git fetch fetches named heads or tags from one or more other repositories, along with the objects necessary to complete them. It means that it updates all <remote>/<branch> and all the tags.

    git fetch <remote> <branch> fetches specified branch from specified repository only.