Open source

Public is not open source until there is a licence

PUBLIC, WITH NO LICENCEREADME.md src/you may read it and fork it on GitHub, and nothing morePUBLIC, WITH AN OPEN SOURCE LICENCEREADME.md src/ LICENSEuse itstudy itchange itshare itMIT, Apache 2.0, GPL: each licence states its conditionsOpen source means anyone may use, study, change and share the code. The licence says so.Being public is not enough: without a licence, the author keeps all rights. An open licenceinvites the world in, and that brings more eyes on the code, faster fixes, shared costs and aplace for anyone to learn and to show their work.

An open source licence lets anyone use, study, change and share the code.

Open source · Going deeper

Why open source

Who benefitsHowPeople who use itFree to use, inspect and adapt; no dependence on one vendorThe projectMore reviewers, more testers, fixes and ideas from everywhereContributorsLearn from real code, build a public record of work, meet peersCompaniesShare the cost of common tools, attract engineers, set standardsEveryoneTransparency: anyone can check what the code really doesA healthy project hasREADME, LICENSEWhat it is, and what you may do with itCONTRIBUTINGHow to take part, next to a code of conductA good first contribution: an issue labelled "good first issue".

More reviewers, shared costs, and transparency.

Contributing

Fork, change, then ask with a pull request

THEIR REPOSITORY: OCTO-ORG/TOOLmain: you have no write access1 forkYOUR FORK: MONA/TOOLmain: a copy that you control2 a branch with your commits3 pull requestmaintainers review, then mergeA fork lets you contribute to a project you cannot push to.Fork the repository, commit to a branch on your copy, and open a pull request back to theoriginal, called the upstream. The maintainers decide. Sync your fork now and then, so itkeeps up with upstream.

Fork the repository, commit on your copy, open a pull request to upstream.

Contributing · Going deeper

About forks

About forksUpstreamThe original repository the fork was made fromSync forkA button that brings upstream's new commits into your forkVisibilityA fork of a public repository is publicDeletingDeleting your fork does not touch upstreamWithin a teamPeople with write access use branches instead of forksTemplate insteadTo start something new from the files, with no link backFork to contribute. Use a template to start fresh. Clone to work on your computer.Maintainers can push to the branch of your pull request, if you allow edits from maintainers.

Upstream, sync fork, and when to use a template instead.

Check yourself

?commit to a branchon your copyopen a pull requestto octo-org/tool

You cannot push to octo-org/tool. What is step 1?

InnerSource

Open source habits, inside the company walls

Closedonly the team can see and change itprivate repositoryINNERSOURCE: ANYONE IN THE COMPANY · INTERNAL REPOSITORYOPEN SOURCE: ANYONE IN THE WORLD · PUBLIC REPOSITORYInnerSource is open source practice, kept inside the company.Any employee can find a team's repository, read it, open an issue and send a pull request, whilethe owning team reviews and decides. It reduces duplicated work and breaks down silos. OnGitHub, internal visibility makes a repository readable by the whole enterprise.

InnerSource opens code to the whole company, not to the world.

InnerSource · Going deeper

InnerSource in practice

InnerSource practiceWhat it looks likeDiscoverableInternal repositories with clear names, descriptions and topicsDocumentedA README and a CONTRIBUTING guide, as in open sourceOpen to contributionOther teams fork or branch, then send pull requestsReviewed by ownersThe owning team, or its CODEOWNERS, approves changesDiscussed in the openIssues and discussions instead of private messagesThe benefits: less duplicated work, faster fixes, and engineers who can move between teams.InnerSource code is still proprietary. Nothing is published outside the company.

Discoverable, documented, and reviewed by owners.

Discovery

Topics and a clear description get a repository found

octo-org / toolA fast command-line tool for CSV filesREADME · MIT licence · 2,400 starscsvclirusttopicsSearchmatches the name, description and topicsTopic pagesgithub.com/topics/csvExplore and Trendingpopular and fast-growing repositoriesA clear description and topics are how people find a repository.Topics are tags you add to a repository. With a good README and a licence, they put it in frontof people who search, browse a topic or open Explore. Stars then signal that others value it.

A description and topics place a repository in search and Explore.

Discovery · Going deeper

Follow, star, watch, fork, sponsor

ActionWhat it doesYou then seeFollow a personSubscribes you to their public activityTheir stars, new repositories, in your feedFollow an organizationSubscribes you to its public activityNew repositories, discussions, sponsorshipsStar a repositoryBookmarks it, and shows appreciationIt in your stars list; similar suggestionsWatch a repositoryTurns on notifications for itIssues, pull requests, releasesFork a repositoryMakes your own linked copyA repository under your accountSponsorPays a maintainer or projectA sponsor badge on your profileFollow is for people and organizations. Star and watch are for repositories.Your profile README, pinned repositories and contribution graph are how others get to know you.

Follow people. Star and watch repositories.

Check yourself

Wantsto save a repository to find it again laterAlsoto show the maintainers some appreciationNotnotifications about its issues and releases

Which action fits?

Sponsors and Marketplace

Fund the people. Add the tools

GITHUB SPONSORS: PAY THE PEOPLESponsora person or companyMaintaineror a project✓monthly or one-time, in tiers✓a Sponsor button on profiles and repositories✓no GitHub fee when a person sponsorsGITHUB MARKETPLACE: ADD THE TOOLSAppsintegrate with GitHubActionssteps for workflows✓free and paid tools, installed in a few clicks✓paid plans are billed through GitHub✓a verified badge for checked publishersSponsors funds the people behind open source. Marketplace adds tools to your workflow.Most open source is maintained by volunteers, and Sponsors lets users pay them directly.Marketplace is the catalog of apps and actions that extend GitHub, such as code quality, testingand deployment tools.

Sponsors pays maintainers. Marketplace offers apps and actions.

Sponsors and Marketplace · Going deeper

Clue words for the GitHub community

When the question saysThe answer isRemember"anyone may use, change and share the code"Open sourceneeds a licence"open source practices inside a company"InnerSourceinternal repositories"contribute without write access"Fork, then pull requestto upstream"start a new project from the same files"Template repositoryno link back"fund an open source maintainer"GitHub Sponsorstiers; Sponsor button"find apps and actions to extend GitHub"GitHub Marketplacefree and paid"see a developer's public activity"Followpeople and organizations"bookmark a repository"Starno notifications"notifications for a repository"Watch"make a repository easier to find"Topicsplus a description, README"browse popular projects"Explore, TrendingDomain 7 is 5 to 10% of the exam. That completes all seven domains.

InnerSource, fork, Sponsors, Marketplace and topics.

Check yourself

Needsa ready-made code quality tool for pull requestsFromanother publisher, with a verified badgeBillingthrough the team's existing GitHub account

Where should this team look?

Lesson complete

You finished “The GitHub community”

Answer the questions along the way to see your score here.

Back to GitHub Foundations

Open in a new tab