Pergunta

I'm fairly new to GIT and I've been trying to find an answer to this question on the internet but so far haven't found anything that speaks to it.

If I understand correctly the purpose of forking a repo is to allow you to play with the code in preparation of making a pull request, and then to make a pull request in order to contribute to the project.

But many times authors have done a fantastic job of creating plug-and-play javascript resources. In those cases I just want to keep a clean, and current, copy available for projects.

Take for example Lea Verrou's prefixfree. This is a brilliant project written by someone who knows a lot more about the vendor prefix mess than I ever will. I'm honestly not likely to be able to contribute to the project.

In this case, is forking the best option or is there a better way to maintain concurrency and storage for downloads?

Foi útil?

Solução

You don't need to fork a project. To get the repository, you can just clone it.

Go to the project page on GitHub and use the project URL to clone it:

Github Clone

(clicking the copy to clipboard button, well, copies the URL to the clipboard)

Open git bash and navigate to your desired folder. Then run:

git clone <your clone URL>

which in your case it would be:

git clone https://github.com/LeaVerou/prefixfree.git

Whenever new updates arrive, you can just update your repository using:

git pull origin

If you don't want the entire project history and all you need is the latest snapshot of the source files, you can click the 'Download ZIP' button to download the source files as a zip archive.

You don't even need to have an account on GitHub to perform these tasks.

The "Fork me on GitHub" ribbon is only a sign that tells the world he is using GitHub for collaborations on the project. It just directs you to the project's page.

Outras dicas

On git a project can be forked to:

  • create a new repo containing features that will be eventually pulled into the main repo; this is the common usage in the Linux kernel, where each subtree maintainer keeps his own repo (periodically pulled by Linus Torvalds)

  • create a repo containing some difference with respect to the original project, to offer some extra functionality or a different configuration that are not meant to go upstream.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top