# Forks

## What is a fork?

A fork is a copy of a database. The fork model exists so that you control who can modify your data, and determine what data gets merged. You can continue to pull changes from the database that you forked from, and you can submit [pull requests](https://docs.dolthub.com/concepts/dolthub/prs) back to it. You can use it as a tool to get your changes onto a database, or you can use it to take that database in a different direction.

## How to use forks

Forks on DoltHub are useful in two main ways:

1. You can propose changes to a database you don't have write permissions to
2. You can experiment with or adopt someone else's database for your own use case without making changes to the original data

You can create a fork, making changes to your fork, and then submit a [pull request](https://docs.dolthub.com/concepts/dolthub/prs) in the original database.

## Difference between GitHub forks and DoltHub forks

GitHub forks are very similar to DoltHub forks in both purpose and practice.

## Example

You can use the fork button on the top right of any database to fork the database to your own namespace. We will use our [`us-schools` database](https://www.dolthub.com/repositories/dolthub/us-schools) as an example.

![](https://1372377717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO3iUAEaFtCYE0joxfA%2Fuploads%2Fgit-blob-c51a0d21fe7883ec4e07badd9e0f23b7db4a8b04%2Ffork-database.png?alt=media\&token=b3627211-e762-46c4-82d2-04eb3df1ea82)

There is now a fork of `us-schools` in our namespace called `taylor/us-schools`. We can either edit directly on DoltHub or clone and edit using Dolt.

```
% dolt clone taylor/us-schools
cloning https://doltremoteapi.dolthub.com/taylor/us-schools
141,350 of 141,350 chunks complete. 0 chunks being downloaded currently.
```

If you forked a database to do your own experimenting, your work here is done. However, if you'd like to propose changes to the base database, you can create a [pull request](https://docs.dolthub.com/concepts/dolthub/prs) by navigating to `dolthub/us-schools` and clicking one of the new pull request buttons.

![](https://1372377717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO3iUAEaFtCYE0joxfA%2Fuploads%2Fgit-blob-f665a1e2075c4e3d934de9122b816e1df9dcb647%2Fnew-pull-request.png?alt=media\&token=32827481-2c83-44a4-b15e-c44a0fae39eb)

Select your fork as the "From database" and select a branch and title.

![](https://1372377717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO3iUAEaFtCYE0joxfA%2Fuploads%2Fgit-blob-ccae8d34ddf72a917b9d3964df9860a35ebf1112%2Fnew-pull-request-form.png?alt=media\&token=0c7e8c7b-20aa-410c-a3c6-9c4046928466)

The owner of the base database (in this case `dolthub`) can then request any changes in your pull request and merge if they approve the request.

You can also update your fork with the latest changes from the upstream database using the pull request form in your own database.

![](https://1372377717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO3iUAEaFtCYE0joxfA%2Fuploads%2Fgit-blob-1f958673cb53ce39bf0db3f41a10410a996cdd80%2Fnew-pull-upstream-db.png?alt=media\&token=c4000c0a-bacb-42f1-8d34-645687117676)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dolthub.com/concepts/dolthub/forks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
