Forking the Workflow
The following diagram displays an example of a fork:
Figure 5.1: Fork example
Exercise 30: Forking a Repository
To set up a fork in the GitHub repository.
- Open your favorite browser and go to
https://github.com/mrmuli/fork-demo
:Note
The following screenshot shows what an original repository would look like on the top-right corner; notice the Fork button.
Figure 5.2: Fork demo
- Select the Fork button, and GitHub should show the following prompt:
Figure 5.3: Fork location
- Select your profile, and GitHub should immediately start the process.
Note
This should automatically direct you to the fork you just made.
Outcome
From the repository name, GitHub will show the fork icon, the repository name, and the upstream (origin), as shown in the following screenshot:
Figure 5.4: Fork demo
Why Do We Fork Repositories?
There are a number of reasons why forking repositories is important...