What is a Git alternates file and how does it enable object sharing between repositories?

Git Hard

Git — Hard

What is a Git alternates file and how does it enable object sharing between repositories?

Key points

  • The alternates file helps in sharing objects between related repositories.
  • It is used by git clone --shared and server-side repository forks.
  • Objects can be read from alternate stores listed in the file.
  • This method helps in reducing disk space usage.

Ready to go further?

Related questions