Repaso
EspaƱol
Maven, Git & SDLCFoundationsVCS-29

What is a Git branch?

Options

  1. A separate line of development, apart from main (Correct option)
  2. A copy of the project hosted on another website
  3. A type of commit message with a special format
  4. A file that was deleted from the working directory

Answer

A separate line of development where you can work without affecting the main line

Why

Commits can be organized into multiple lines of development called branches.

The usual way to work: create a branch for your feature (git switch -c feature/login), commit there, and when it is ready open a pull request to merge it into the main branch.

The main line is often called main. Branches are cheap in Git, so use them freely.

Remember

Branch = a safe parallel line of work.

Key terms

Practice this question in Repaso