2015-12-29 22:54:20 +00:00
|
|
|
# git fetch
|
|
|
|
|
2016-01-21 12:08:45 +00:00
|
|
|
> Download objects and refs from a remote repository.
|
2019-01-30 11:19:23 +00:00
|
|
|
> Homepage: <https://git-scm.com/docs/git-fetch>.
|
2015-12-29 22:54:20 +00:00
|
|
|
|
2016-12-02 13:19:05 +00:00
|
|
|
- Fetch the latest changes from the default remote upstream repository (if set):
|
|
|
|
|
|
|
|
`git fetch`
|
|
|
|
|
|
|
|
- Fetch new branches from a specific remote upstream repository:
|
2015-12-29 22:54:20 +00:00
|
|
|
|
|
|
|
`git fetch {{remote_name}}`
|
|
|
|
|
2016-12-02 13:19:05 +00:00
|
|
|
- Fetch the latest changes from all remote upstream repositories:
|
2015-12-29 22:54:20 +00:00
|
|
|
|
|
|
|
`git fetch --all`
|
2016-10-27 05:55:22 +01:00
|
|
|
|
2016-12-02 13:19:05 +00:00
|
|
|
- Also fetch tags from the remote upstream repository:
|
2016-10-27 05:55:22 +01:00
|
|
|
|
|
|
|
`git fetch --tags`
|
2016-12-02 13:19:05 +00:00
|
|
|
|
2017-01-15 10:49:13 +00:00
|
|
|
- Delete local references to remote branches that have been deleted upstream:
|
2016-12-02 13:19:05 +00:00
|
|
|
|
|
|
|
`git fetch --prune`
|