Note: Please go to to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > Guides > Chef Cookbooks Developer Guide > Developer > Source Control Management Systems > GitHub > Clone vs. Fork

Clone vs. Fork

What is the difference between cloning and forking a repository?

Fork a Repository

One of the key benefits of using Chef is the ability to use cookbooks from others in the Chef community. You can use cookbooks from an existing repository as-is, but if you want to make changes to any of its cookbooks, you will need to fork the repository, which creates an editable copy of the entire repository (including all of its branches and commits) in your own source control management (e.g. GitHub) account. Later, if you want to contribute back to the original project, you can make a pull request to the owner of the original cookbook repository so that your submitted changes can be merged into the main branch. By forking a repository, you're maintaining the relationship between the original version and your modified version, which makes it easier to push and pull code updates between the repositories. You are encouraged to fork RightScale's own repositories to make your own improvements to our cookbooks and later make pull request backs to RightScale so that we can incorporate your enhancements and make them available to others in the RightScale community so that everyone can benefit from each other's contributions. Typically, you will fork a repository if you want to make modifications to an existing repository where you only have 'read-only' access.

See Fork a Cookbook Repository.

Note: In order to submit code submissions, you must complete a RightScale Contributors Agreement found here.

Clone a Repository

You should clone a repository if you plan to push your changes back to the same repository where you have read+write access privileges. You should also clone a repository if you are building a new repository that is unique. This way, you can start with the basic structure of a cookbook instead of creating it from scratch.

See Clone a Cookbook Repository.

Example Diagram


  1. For example, if you want to override one of RightScale's cookbooks, you will need to fork the associated repository to create your own editable version.
  2. Clone the repsitory to retrieve and save a copy of the repository's contents to your Chef development machine's local directory.
  3. Edit the local copy of the cookbooks.
  4. Commit and push the changes to your forked repository.
  5. (Optional) If you have made improvements to the cookbooks and would like your changes to be incorporated into the original repository (that you cloned from), make a pull request (in GitHub) to the owner of the cookbook repository.


You must to post a comment.
Last modified
22:05, 16 May 2013


This page has no custom tags.


This page has no classifications.



© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.