2015-12-30 01:54:20 +03:00
|
|
|
# git fetch
|
|
|
|
|
2016-01-21 15:08:45 +03:00
|
|
|
> Download objects and refs from a remote repository.
|
2019-06-03 03:06:36 +03:00
|
|
|
> More information: <https://git-scm.com/docs/git-fetch>.
|
2015-12-30 01:54:20 +03:00
|
|
|
|
2016-12-02 16:19:05 +03: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-30 01:54:20 +03:00
|
|
|
|
|
|
|
`git fetch {{remote_name}}`
|
|
|
|
|
2016-12-02 16:19:05 +03:00
|
|
|
- Fetch the latest changes from all remote upstream repositories:
|
2015-12-30 01:54:20 +03:00
|
|
|
|
|
|
|
`git fetch --all`
|
2016-10-27 07:55:22 +03:00
|
|
|
|
2016-12-02 16:19:05 +03:00
|
|
|
- Also fetch tags from the remote upstream repository:
|
2016-10-27 07:55:22 +03:00
|
|
|
|
|
|
|
`git fetch --tags`
|
2016-12-02 16:19:05 +03:00
|
|
|
|
2017-01-15 13:49:13 +03:00
|
|
|
- Delete local references to remote branches that have been deleted upstream:
|
2016-12-02 16:19:05 +03:00
|
|
|
|
|
|
|
`git fetch --prune`
|