Difference between revisions of "Git/fetch"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Git
Jump to navigation Jump to search
(local manpage link)
m
 
Line 1: Line 1:
 +
{{fmt/title|git fetch}}
 
'''Action''': "fetches" named heads or tags from one or more other repositories, along with the objects necessary to complete them.
 
'''Action''': "fetches" named heads or tags from one or more other repositories, along with the objects necessary to complete them.
  

Latest revision as of 23:50, 5 August 2022

git fetch

Action: "fetches" named heads or tags from one or more other repositories, along with the objects necessary to complete them.

"Fetch" is a bit of a misnomer, as it doesn't actually retrieve (download) any files but instead creates a "pointer" file (.git/FETCH_HEAD) to any items in need of retrieval. These can then be operated on by merge.

Examples

  • git fetch github master
    • where "github" is the name of the remote and "master" is the branch.

Links

Documentation