• We’ve always used GitHub as a free remote repository, and if it’s a personal open source project, there’s no problem putting it on GitHub. GitHub is also an open source collaboration community that allows people to participate in both your open source projects and others’ projects.
  • Before GitHub, open source projects were easy to open, but it was difficult for the masses to participate, because to participate, you had to submit code, and it was not realistic to open an account for everyone who wanted to submit code. Therefore, the masses only reported a bug, and even if they could change the bug, they could only put itdiffThe documents were sent by email, which was inconvenient.
  • But on GitHub, with Git’s extremely powerful cloning and branching capabilities, the public can participate freely in open source projects for the first time.
  • How do you get involved in an open source project? Like the most popularbootstrapThis is a very powerful CSS framework, you can visit its project home pagehttps://github.com/twbs/bootstrap, point”Fork“He cloned one under his own accountbootstrapWarehouse, and then, from his own accountclone:
git clone[email protected]: username /bootstrap.gitCopy the code
  • Be sure to clone the repository from your own account so that you can push changes. If bootstrap from the author of the warehouse address[email protected]:twbs/bootstrap.gitClone, because without permissions, you will not be able to push changes.
  • Bootstrap’s official repositorytwbs/bootstrap, the repository you cloned on GitHubmy/bootstrap, and your own clone to the local computer’s repository, their relationship is as shown below:
┌ ─ making ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ │ │ │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ │ │ │ TWBS/bootstrap │ ─ ─ ─ ─ > │ my/the bootstrap │ │ │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ │ bring │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┼ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ ▼ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ │local/ the bootstrap │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘Copy the code
  • If you want to fix a bug in bootstrap or add a new feature, you can start right away and push it to your repository when you’re done.
  • If you want bootstrap’s official library to accept your changes, you can initiate one on GitHubpull request. Of course, whether the other side accepts yourspull requestNot necessarily.
  • If you don’t have the ability to modify Bootstrap, but want to try it outpull requestFork the repository created by other mailboxes and create oneyour-github-id.txtWrite your own Git learning experience, and then push apull requestTest it out.

summary

  • On GitHub, you can do whatever you wantForkOpen source repository;
  • We ownForkAfter the warehouse read and write permissions;
  • Can pushpull requestContribute code to the official repository.