GitHub And Open Source Collaboration
GitHub Accounts, Profiles, And Repository Ownership
GitHub is not only a remote place to push Git commits. It is a collaboration platform wrapped around Git history, repository permissions, code review, issue tracking, automation, releases, packages, security features, and public identity. A PHP developer can know Git commands well and still struggle on GitHub if they do not understand which decisions belong to the account, which belong to a repository, and which belong to a team or organization.
This lesson uses GitHub's official documentation as the source of truth for product behavior. Start with GitHub's own orientation to GitHub and Git, then check the current documentation before relying on feature names, settings, permissions, or availability. GitHub changes product surfaces over time, so a lesson should teach the model and point learners to the current control panel rather than pretending that every button will keep the same label forever.
The Account Is An Identity Boundary
A GitHub account represents a person or automation identity inside GitHub. It has a username, profile, email settings, authentication methods, notification preferences, contribution history, and access to repositories or organizations. The account is not the same thing as local Git configuration. Local Git writes author and committer information into commits. GitHub decides how those commits attach to a profile based on verified email and account rules.
Choosing a username is therefore more than decoration. A professional username should be readable, stable, and safe to share on resumes, package pages, issue discussions, conference slides, and commit history. It does not need to be a legal name, but it should not be a throwaway joke if the account will represent professional work. Changing a username later is possible, but it can affect links, badges, remote URLs, and how other people recognize you. Treat the choice as part of your public developer identity.
GitHub profiles can include a profile README, pinned repositories, organizations, contributions, achievements, sponsorship information, and activity. GitHub documents profile customization in About your profile. A good profile is not a marketing page filled with every technology logo you have seen. It is a navigation page that helps another developer answer practical questions: what do you work on, which projects are worth opening, how should someone contact or sponsor you if relevant, and what kind of collaboration are you looking for?
Contribution Counts Need Context
GitHub's contribution graph can be useful, but it is not a complete measure of engineering skill. Some valuable work happens in private repositories, pair programming sessions, design reviews, incident response, mentoring, documentation, customer support, or issue triage. Some public contribution graphs are inflated by mechanical commits that do not show judgment. Treat commit count and achievements as signals to interpret, not as a scoreboard.
When teaching contribution history, explain the mechanics. GitHub's profile contributions reference describes which actions count and how repository visibility affects public display. Learners should understand that a missing green square does not mean the work did not happen, and a full graph does not prove code quality. For a hiring or open-source context, better evidence is a small number of readable repositories, thoughtful pull requests, useful issues, and clear documentation.
Verified email matters because it connects commits to a GitHub account. If local Git uses an email address that GitHub has not verified for that account, GitHub may not attribute the commit as expected. This is one reason teams often ask developers to configure Git author name and email deliberately before contributing. It also matters for privacy: GitHub supports no-reply email addresses for users who do not want personal email addresses exposed in commit metadata. Teach learners to check the current GitHub email documentation before deciding which address to use.
Repositories Have Owners
A repository is a project boundary. It contains Git history, branches, tags, issues, pull requests, Actions workflows, releases, packages, settings, collaborators, and security configuration. GitHub's About repositories explains repository basics, but the key design question is ownership: who is allowed to make decisions about this code?
A personal repository is owned by an account. That can be fine for portfolio projects, examples, experiments, and solo tools. An organization repository is owned by an organization and can use teams, organization policies, role-based access, and shared billing or security settings. Production code that belongs to a company, nonprofit, or long-lived project usually should not depend on one person's personal account as the authority. The account may leave, lose access, or change focus. The repository should outlive any one contributor.
Public and private visibility are also ownership decisions. A public repository can be viewed by anyone on the internet. A private repository limits access to selected users or teams according to the account or organization plan and settings. GitHub documents repository visibility in Setting repository visibility. Public is appropriate for open-source projects, examples, and learning work that contains no secrets or private business data. Private is appropriate for proprietary applications, client work, security-sensitive code, unpublished coursework, and anything that includes confidential history.
Visibility is not a security control for secrets already committed. If a repository was public and contained a token, making it private later does not make the token safe. The token should be revoked or rotated. A repository's history can preserve mistakes, forks may exist, and logs may have captured values. Teach learners to prevent secret commits with .gitignore, secret scanning where available, and review habits, but also teach recovery: rotate first, then clean history when needed.
Repository Metadata Helps Humans Decide
A repository name should identify the project without being needlessly clever. A description should say what the project does. Topics help discovery. A homepage link can point to documentation, a deployed demo, package page, or project site. A repository with no description, no README, no license, no issue policy, and no release notes asks every visitor to reverse-engineer intent from file names.
Stars, forks, and watchers are different signals. A star is a lightweight bookmark or endorsement. A fork is a copy under another account or organization, often used for contribution or experimentation. Watching controls notifications. High stars do not prove maintainability; a fork does not always mean an active contribution; watching a repository can create notification noise if the learner does not choose the right level. Explain these as collaboration mechanisms, not popularity metrics.
Archiving a repository is a maintenance signal. An archived repository tells visitors that the project is read-only and no longer actively maintained. It is better than silently abandoning a project when the owner knows work has stopped. For portfolio projects, archiving old experiments can reduce confusion. For dependencies, an archived repository is a warning that the consumer should investigate alternatives, forks, or maintenance plans before adopting it.
Public, Private, And Open Source Are Different Concepts
A public repository is visible. An open-source project has a license that grants permissions to use, modify, and redistribute the work under stated terms. A public repository without a license is not automatically open source in the practical sense a learner may expect. Viewers may be able to read the code, but they do not necessarily have clear permission to reuse it. This distinction belongs early in any GitHub curriculum because many beginners assume public equals free to copy.
Private repositories have their own risks. They can hide unfinished work from the public, but they can also hide missing documentation, weak onboarding, and fragile deployment knowledge from the team. Internal projects still need READMEs, issue hygiene, branch protection, security review, and clear ownership. The audience is smaller, but the collaboration problem remains.
What Good Setup Looks Like
A trustworthy repository setup answers basic questions before anyone opens the code. Who owns the project? Is it public or private intentionally? What does it do? What license applies? How do contributors report issues or security problems? Which branch is the default? Are required checks enforced before merge? Are secrets stored outside Git? Are issues and projects used to track work, or is another tool the authority?
For a PHP project, the first repository setup might include a README.md, composer.json, .gitignore, .env.example, license when public reuse is intended, a small test command, and clear installation instructions. GitHub-specific settings then support the project: repository description, topics, branch protection, Dependabot or other security features where appropriate, and Actions only when automation adds value.
Notifications And Attention
Watching a repository is an attention decision. A maintainer may need notifications for every issue, pull request, release, discussion, or security alert. A casual user may only need release notifications. A contributor may want to watch a repository temporarily while a pull request is active, then reduce notifications after merge. Teaching learners to star every useful project but watch only the repositories that need active attention prevents notification fatigue.
Attention also affects open-source manners. If a project has hundreds of watchers, every noisy issue, duplicate discussion, or vague pull request consumes maintainer time. Good GitHub citizenship starts before code: search existing issues, read the README and contributing guide, confirm the project is active, and ask focused questions. A repository is a shared workspace, not only a download button.
Repository transfer and ownership changes should also be handled deliberately. Before moving a repository between a personal account and organization, check Actions secrets, deploy keys, webhooks, branch protection, package publishing, Pages settings, issue templates, security settings, and integrations. A transfer that preserves Git history can still break automation if permissions or secrets belonged to the old owner.
Verification And Review
Review a GitHub account by checking profile clarity, verified email strategy, authentication posture, and whether public repositories represent the developer well. Review a repository by checking ownership, visibility, README quality, license, issue policy, secret hygiene, branch protection, and whether the metadata matches the real project state.
The learner should be able to explain the difference between a Git identity and a GitHub account, choose public or private visibility deliberately, identify when an organization should own a repository, interpret contribution counts with context, and set up a repository so another developer can understand its purpose without guessing.
Practice
Audit a profile and repository
Choose a GitHub profile and one repository you are allowed to review. Do not use a private repository unless you have permission.
Write a short audit that answers:
- What does the profile communicate well?
- Is the username and profile presentation suitable for the intended audience?
- Is the repository public or private for a clear reason?
- Who appears to own the project: a person, organization, or unclear owner?
- What metadata helps a visitor decide whether to use or contribute?
- What two changes would make the repository easier to trust?
Acceptance criteria:
- Do not include personal contact information that is not already intentionally public.
- Separate facts you observed from recommendations.
- Include at least one recommendation about repository ownership, visibility, or metadata.
Show solution
A strong audit separates observation from judgment.
Example structure:
Observed facts:
- The profile uses a stable professional username and pins three maintained repositories.
- The repository is public, has a description, and belongs to an organization.
- The README explains installation, but the repository has no license file.
Risks:
- Public visibility is reasonable because the project is a learning example, but missing license text means reuse permissions are unclear.
- The repository topics are empty, so discovery is weaker than it needs to be.
Recommendations:
- Add an explicit license or state that the code is not currently licensed for reuse.
- Add topics such as php, learning, cli, or web-app if they match the project.
Verify the audit by checking whether each recommendation points to a decision a maintainer can actually make. "Improve profile" is too vague. "Add a repository description that says this is a PHP CLI invoice parser" is actionable.
Choose repository visibility
- A public portfolio project with no secrets and an MIT-style reuse goal.
- A client application that contains business logic and deployment history.
- An old learning experiment that no longer builds.
For each repository, choose public, private, or archived state. Explain the reason and one follow-up setting or file you would add.
Acceptance criteria:
- Distinguish visibility from licensing.
- Include one secret-handling warning.
- Explain when archiving is more honest than leaving a repository apparently active.
Show solution
- Portfolio project: public, if no credentials or private data have ever been committed. Add a license if reuse is intended, plus a README that explains setup and status.
- Client application: private and preferably organization-owned by the client or company. Add branch protection and document where secrets live outside Git. If any secret was committed before privacy was set, rotate it.
- Old learning experiment: public archived or private archived depending on whether it is useful as a historical example. Add a README status note explaining that it is no longer maintained.
The important distinction is that public visibility controls who can view the repository, while a license controls reuse permissions. Archiving communicates maintenance status; it is not a substitute for deleting secrets or fixing licensing.
Plan organization ownership
A small PHP agency has five developers and stores production client applications under the founder's personal GitHub account. The team wants better continuity.
Design a migration plan at the decision level. Do not write commands. Cover:
- why organization ownership is safer;
- who should have admin access;
- how repositories should be grouped;
- what client or employee departure risk is reduced;
- what should be checked before moving repositories.
Acceptance criteria:
- Mention least privilege.
- Mention repository settings that must be reviewed after transfer.
- Avoid assuming every developer needs admin access.
Show solution
A good plan moves authority from one person to a durable organization.
The agency should create or use an organization owned by more than one trusted administrator. Admin access should be limited to people responsible for repository policy, billing, and emergency recovery. Developers can normally work through team permissions that grant write or maintain access only to the repositories they need.
Repositories can be grouped by client, product, or internal/external status. Before transfer, the team should check deploy keys, GitHub Actions secrets, branch protection, webhooks, package publishing, issue settings, and integrations. After transfer, they should verify that CI still runs, deployment still works, and former personal-account URLs are updated where needed.
This reduces the risk that a founder's account loss, departure, or personal security issue blocks production work.