CodeBlanks Logo Icon CodeBlanks

Overview

See the team repository workflow steps.

Team repository workflow

In a team repository, multiple developers work on the same project. Each developer completes their task on a separate branch and pushes their changes to the remote repository. A pull request is then opened, the code is reviewed, and approved changes are merged into the main branch.

Take a task
   ↓
Create a branch
   ↓
Develop code
   ↓
Push and PR
   ↓
Review and merge

From task to review

When a task is completed, the developer commits the changes and pushes their branch to the remote repository. A pull request allows the team to review these changes. Based on the review, necessary corrections can be made or the changes can be approved.

git add .
git commit -m "feat: add profile page"
git push -u origin feature/profile-page

Practice Arrange the team workflow

Represent the team repository process from taking a task to requesting a merge in five lines. Print the steps in this order: take a task, create a branch, commit, push, and pull request.

Starter code

terminal
// Ekip iş akışını sırayla yazdır

Sample solution

terminal
print("Take task")
print("Create branch")
print("Commit changes")
print("Push branch")
print("Open pull request")

Expected output

Take task
Create branch
Commit changes
Push branch
Open pull request

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 What is the main advantage of completing a developer's task on a separate branch?

  • Completely resetting commit history
  • Directly deleting other developers' work
  • Developing changes independently of the main branch Correct answer
  • Automatically removing the remote repository

Explanation: Separate branches allow developers to complete tasks without directly affecting each other's work.

2 Push the team branch to the remote

Question
git push -u origin ____
Answer
git push -u origin feature/profile-page

Explanation: The feature branch is pushed to origin, and the -u option establishes an upstream tracking relationship.

3 Team workflow concepts

Term Meaning
Görev Work assigned to a developer
Özellik dalı Independent development area
Pull request Request to review changes
Onay Permission to merge

All lessons in Intermediate

20 Intermediate final

  1. Branch management
  2. Rebase
  3. Conflict
  4. PR flow