What is a fork?
- Git course
- Intermediate
- Lesson 53/82
- 4 min
Learn that a fork is a copy of a repository.
What Is a Fork?
A fork is an independent copy of another user's remote repository under your own account. It is commonly used when contributing to open-source projects. Creating a fork does not change the original repository; you can work on your own copy.
Original repository: user/project
Fork: your-account/projectWhy Use a Fork?
A fork lets you prepare changes in projects where you do not have direct write access. You can edit files and create commits in your own copy, then propose your changes to the original project.
Original project
↓ Fork
Copy in your account
↓ Changes
Contribution proposalPractice Identify a Fork URL
Create the GitHub URL for the fork repository below. The account name must be dev-user and the repository name must be sample-app.
Starter code
# Fork deposunun adresini oluştur
fork_url = ""Expected output
https://github.com/dev-user/sample-app
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 What happens when you fork a project into your account?
- All files on your computer are automatically deleted.
- The owner of the original repository changes automatically.
- The original repository is deleted.
- An independent repository copy is created in your account. Correct answer
Explanation: A fork creates a separate repository copy in your account without deleting the original.
2 Specify the Fork Repository Account
https://github.com/____/proje
https://github.com/hesabim/proje
Explanation: In a fork URL, the account name is part of the repository path. You use your own account name here.
3 Fork Concepts
| Term | Meaning |
|---|---|
Fork |
Remote repo copy in your account |
Kaynak depo |
The original repository being copied |
Hesap |
The user space hosting the repository |
Bağımsız kopya |
Repo where you make your own changes |