Will my repository disappear if a key maintainer or owner leaves the project?
It depends on the situation, but don't panic; it's highly unlikely to disappear.
Let me give you an analogy: your repo
(code repository) is like a shared folder in the cloud, similar to Tencent Docs or Shimo Docs.
The key is who created this "shared folder" and under whose name it is registered.
1. The safest scenario: The repo is under the company/team's "organization account"
This is the most formal and recommended practice. Platforms like GitHub, Gitee, and GitLab all support creating "Organizations." Your code repository should be created under such an "Organization."
- Ownership belongs to the company: In this case, the code repository's owner is the "Organization," not any specific employee.
- Employees are just collaborators: The person who left was merely an authorized member.
- What if they leave?: As an administrator, you can simply remove them from the organization. Their permissions will be instantly revoked, and they won't be able to touch the repository. The repository itself will remain safe and sound.
This is like the company's Tencent Docs: the boss is the administrator, and when an employee leaves, you just remove them from the collaborators list; the document itself won't be lost.
2. The more dangerous scenario: The repo is under their "personal account"
This is a common mistake many startups make. For example, the initial tech lead, for convenience, directly created the project repository using their personal account and then added others as "collaborators."
- Ownership belongs to them: In this situation, the code repository is their "private property." The rest of you are just "guests" invited by them.
- What if they leave?: Then you're in big trouble. As the repository owner, they have supreme authority. They can:
- Directly delete the repository (the worst-case scenario).
- Set the repository to private and kick all of you out.
- Sell the code to others.
If they leave, it's like they deleted the shared document or changed the password, preventing you from viewing it.
What should you do now?
-
Go check immediately! Open your code repository webpage and look at the URL in the browser's address bar.
- If it's a structure like
github.com/your-company-name/project-name
, then congratulations, it's safe. - If it's a structure like
github.com/that-guy-who-left's-name/project-name
, then be vigilant!
- If it's a structure like
-
If it's a personal repository, fix it quickly!
- Communicate immediately: If you can still contact them, politely ask them to transfer the repository's ownership to your account, or ideally, to a newly created "Organization." Platforms usually have this "transfer ownership" feature.
- Worst-case scenario: If they've disappeared or are uncooperative, you and other remaining team members should immediately back up the code on your computers (local repositories)! Because Git is distributed, everyone's computer has a complete history of the code. As long as someone has the latest code, you won't lose everything. You can use this local code to create a new central repository under your own organization account, and then everyone can push their code to it. Although you might lose some original repository issues and PR records, the core code will be preserved.
To summarize:
A code repository itself won't disappear just because someone's computer breaks or they go missing. However, who its "owner" is determines its fate. A major taboo for startups is placing the company's core digital assets under an employee's personal name. Go check it out quickly.