Git - Fetch (Remote Repository Sync)


A fetch will sync information locally from a remote repository.

It will mostly

git fetch:

  • download new remote branch
  • download all commits added since the last fetch to the actual branch ( The head of the last fetch are saved in the FETCH_HEAD file.)
  • download new tags

from one or more other remote repositories

remote branche cannot be modify directly, you need to create a tracking branch (ie a local branch that tracks the remote branch head)


The last commit (head) fetched for all branches are in the FETCH_HEAD file located a git_dir/FETCH_HEAD

Documentation / Reference

Powered by ComboStrap