Skip to content
Snippets Groups Projects
Forked from R3 / school / courses
265 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

$ git checkout <branchName>

You can switch to the develop branch with

$ git checkout develop

If the local branch does not exist but the remote does, it is created automatically.

Create your own version

Assume that you want to work on a file:

Create a new branch!

$ git checkout -b myBranch

The -b flag creates the branch. Locally, you have your own version now:

Push your version to your fork:

$ git push origin myBranch