0
0
Gitdevops~30 mins

Pull request process in Git - Mini Project: Build & Apply

Choose your learning style9 modes available
Pull Request Process
📖 Scenario: You are working on a team project using Git. Your team uses pull requests to review and merge code changes safely. You will practice the basic pull request process using Git commands.
🎯 Goal: Learn how to create a new branch, make a commit, push the branch to a remote repository, and open a pull request for code review.
📋 What You'll Learn
Create a new branch called feature-update
Make a commit with the message Update README with project info
Push the feature-update branch to the remote repository
Open a pull request from feature-update to main
💡 Why This Matters
🌍 Real World
Teams use pull requests to review code changes before merging to main projects. This helps catch mistakes and improve code quality.
💼 Career
Knowing how to create and manage pull requests is essential for collaboration in software development jobs.
Progress0 / 4 steps
1
Create a new branch
Use the command git checkout -b feature-update to create and switch to a new branch called feature-update.
Git
Need a hint?

This command creates a new branch and switches to it in one step.

2
Make a commit with a message
Use git commit -m "Update README with project info" to commit your changes with the exact message Update README with project info.
Git
Need a hint?

Make sure to include the message exactly as shown inside double quotes.

3
Push the branch to remote
Use git push origin feature-update to push the feature-update branch to the remote repository named origin.
Git
Need a hint?

This command uploads your branch to the remote repository so others can see it.

4
Open a pull request
Use the command gh pr create --base main --head feature-update --title "Update README with project info" --body "This pull request updates the README file with project information." to open a pull request from feature-update to main with the given title and description.
Git
Need a hint?

This command uses GitHub CLI to open a pull request with a clear title and description.