Skip to content
Snippets Groups Projects
Forked from R3 / school / courses
998 commits behind the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.

Development scheme


Generally, in a repository, there are guidelines for contributing.

A common development scheme is dual with a:
  • development version of the code on develop
  • stable version of the code on master

A **version** of the code is referred to as a **branch**.



In the practice repository, the development branch is called `develop`!

bulb Use this dual development scheme for your own repositories!

Branches

A version of the code (i.e., a branch) is made up of a sequence of code changes.


These individual code changes are called **commits**.

For instance, the master and develop branches can be represented as a timeline:

Switch between branches

List all branches of the repository with

$ git branch -a

Exit by typing q. The branch with the ***** is the current branch.


Checkout another branch ```bash $ git checkout branchName ```

You can switch to the `develop` branch with ```bash $ git checkout develop ```

Create your own version

Assume that you want to work on a function for adding 2 numbers.


Create a new **branch**!
$ git checkout -b add-2-numbers

The -b flag creates the branch.

Locally, you have your own version now:

Push your version to your fork:

$ git push origin add-2-numbers