Pull Request

Pull requests let you tell others about changes you've pushed to a GitHub repository. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary.

What?

(source: Github Help Page)

Where?

Upstream of forked repository.

Team project repository.

Code Review

Make sure your changes does not break any working code.

Make sure your code follows the style guide.

Does your code pass the test (is there even a test) ?

Talking bout' PR...

How?

Create separate branch

git checkout -b new_branch

# equal to

git branch new_branch && git checkout new_branch

Change Something

git add some_changed_files

git commit -m 'Changing here and here, also here'

Push It

git push origin new_branch

Create Pull Request

In gitlab, the term is Merge Request.

This is where the code review starts

Merging

If everyone is happy with your changes, let's merge it!

There are 2 ways to merge PR:

Merge commit

Squash, rebase, cherry-pick

So...

Code in master branch should be ready to be shipped

Even if you're working alone, you can use any git workflow that suitable for your needs.

Made with Slides.com