Git: Fork vs Mirror

4.4k Views Asked by At

What's the difference between creating a mirror and a fork. Both are copies of a repo, but is one a shallow copy (mirror) and one a deep copy (fork)? Just trying to get a better understanding for migrating a repo.

1

There are 1 best solutions below

3
On
  • A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project. Usually a fork knows about its source repository, usually called upstream. This fact allows for sending pull requests (changes between upstream repo and the fork) back to upstream repo.
  • A mirror allows to maintain a copy of repository without forking it