- Git “fetch” Downloads commits, objects and refs from another repository.
- It fetches branches and tags from one or more repositories.
- It holds repositories along with the objects that are necessary to complete their histories to keep updated remote-tracking branches.
1 | Fetch repo | git fetch< repository Url> |
2 | Fetch specific branch | fetch <branch URL><branch name> |
3 | Fetch all branches | git fetch -all |
4 | Get latest changes /sync | git fetch origin |