what is fork in github? code example

Example 1: github fork

GitHub fork
Featured snippet from the web
A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project. Most commonly, forks are used to either propose changes to someone else's project or to use someone else's project as a starting point for your own idea.

Example 2: fork on github code

$ git clone https://hostname/YOUR-USERNAME/Spoon-Knife
> Cloning into `Spoon-Knife`...
> remote: Counting objects: 10, done.
> remote: Compressing objects: 100% (8/8), done.
> remove: Total 10 (delta 1), reused 10 (delta 1)
> Unpacking objects: 100% (10/10), done.

Example 3: fork on github code

$ git remote -v
> origin  https://hostname/YOUR_USERNAME/YOUR_FORK.git (fetch)
> origin  https://hostname/YOUR_USERNAME/YOUR_FORK.git (push)