GitHub is one of the most commonly used version control and collaboration softwares in the development community.
Branches allow users to develop in an isolated environment without affecting the rest of the repository. Each repository has a main
branch, and all other branches come from existing branches. To merge the work on two or more branches, you must use a pull request.
You can set a branch to be compared to another (usually main
) branch. This allows you to view the changes as they appear in the main files once the changes are merged. When you open a pull request. you compare two branches that may be merged (if there are no conflicts).
- Lines that are added are highlighted with a green background and are preceded by a
+
sign.- Lines that are removed are highlighted with a red background and are preceded by a
-
sign.
There are different ways you can view the differences in the branches being compared.
Free Resources