Set Up Your Local Repository

    • OUT OF DATE
      +
      This documentation is out of date

      You only need to do these steps the first time you contribute to a repository.

      Fork the Repository

      Before you can contribute changes to the Couchbase documentation, you must fork the appropriate repository to your personal GitHub account.

      1. Go to the appropriate repository on GitHub and click Fork. See Repository Organization for the list of active repositories

      How to quickly find the right repository

      To quickly find a page’s source file, click on the edit edit icon at the top of the page. You’ll be taken to the page’s repository. Click Fork.

      If there isn’t an edit edit icon on the page, then the repository can’t accept changes using the regular workflow. See Repositories that Require Special Handling for more information or propose fixes and improvements using the Feedback? button at the bottom of the page.

      Clone the Repository

      After you fork the repository, clone it to your device.

      1. Create or select the folder where you want to store the repository on your device.

      2. Open a terminal and change into the selected folder.

        $ cd path/to/folder
      3. Go to your repository on GitHub, and click Clone or download.

      4. Click the Clipboard icon to copy the repository’s Git URL.

      5. In your terminal type git clone, paste the copied URL, and press Enter. For example, to clone your fork of the docs-server repository, you’d enter:

        $ git clone git@github.com:this-is-you/docs-server.git
      6. Change into the repository folder created by the clone operation.

        $ cd docs-server

      Sync with the Upstream Repository

      You need to connect your local repository to the upstream repository so the two repositories can stay in sync.

      1. Go to the upstream repository on GitHub, and click Clone or download.

      2. Click the Clipboard icon to copy the repository’s Git URL.

      3. In your terminal type git remote add upstream, paste the copied URL, and press Enter. For example, to connect to the remote upstream docs-server repository, you’d enter:

        $ git remote add upstream git@github.com:couchbase/docs-server.git
      4. View the configured upstream and origin values and confirm the URLs are correct.

        $ git remote -v

        The origin URLs should point to your personal fork, and the upstream URLs should point to the repository in the Couchbase organization.

      5. Download upstream changes.

        $ git fetch upstream

      Now you’re ready to start working on the documentation.