git fetch

From wikieduonline
Jump to navigation Jump to search

git fetch (docs) downloads new commits, branches, and tags from a remote repository into your local repository's remote-tracking references (e.g. origin/main), without modifying your working directory or current branch. It lets you see what has changed remotely before deciding to integrate those changes with git merge or git rebase. In short: it updates your knowledge of the remote, but leaves your local work untouched.


Download objects and refs from another repository.

Commands[edit]

Examples[edit]

git fetch 
(no output)
git fetch https://github.com/zabbix/zabbix-docker.git
fatal: not a git repository (or any of the parent directories): .git

Solution: git clone

Errors[edit]

fatal: not a git repository (or any of the parent directories): .git

Related commands[edit]

Activities[edit]

See also[edit]

Advertising: