How to fork, clone and set up a repository

https://docs.github.com/en/get-started/quickstart/fork-a-repo

https://articles.assembla.com/en/articles/1136998-how-to-add-a-new-remote-to-your-git-repo

<aside> 🤖 The way to work with MUI’s repos (or other open source projects) is to fork the main repository (upstream) and keep our version in sync with the main one

</aside>

<aside> 💡 There is a second way without having to sync origin and upstream repeatedly: 🌋 Use upstream only

</aside>

Step by step guide

Fork the repository

  1. Navigate to the GitHub repository you want to fork

  2. In the top-right corner of the page, click Fork.

    1. Under "Owner," select the dropdown menu and click an owner for the forked repository.

    2. By default, forks are named the same as their upstream repositories. Optionally, to further distinguish your fork, in the "Repository name" field, type a name.

    3. Optionally, in the "Description" field, type a description of your fork.

    4. Optionally, select Copy the DEFAULT branch only.

      For many forking scenarios, such as contributing to open-source projects, you only need to copy the default branch. If you do not select this option, all branches will be copied into the new fork.

  3. Click Create fork.

Clone the repository

Under the Code button, in the SSH tab, click the Copy to clipboard button

In Git Bash clone the repository you copied to your clipboard like this:

git clone [email protected]:yourgithubuser/mui-x.git

⭐ non-engineer tip

I had a lot of trouble cloning the repository in Git Bash, but found this relatively easy:

  1. Download GitHub Desktop