Skip to content

Workflow: Pull Request

Syb Wartna edited this page Dec 27, 2020 · 11 revisions

0. Fork and clone

On Github: Click the Fork button on the original repository. Then clone and set up your fork locally:

git clone https://github.com/**<your-username>**/frontend-boilerplate.git
cd frontend-boilerplate
git remote add upstream https://github.com/mirabeau-nl/frontend-boilerplate.git
npm install

1. Make changes

Make sure your commit and pull request will be only 1 feature addition or refactoring change, multiple different changes will not be accepted.

git commit
git push

We like to keep out Git messages standard. We use the Karma git commit messages style: https://karma-runner.github.io/5.2/dev/git-commit-msg.html

2. Update your fork

Make sure you are currently on the branch you'd like to merge to (git checkout <branch-name>), then run:

git fetch upstream
git rebase upstream/master

3. Squash your commits

If you did multiple commits instead of one, you are required to squash them into a single commit. If you have, for example, 3 commits, this would be the way to do this:

git rebase -i HEAD~3

Read more: http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html

4. Push your changes to your fork

git push --force

5. Open Pull Request

Open your fork on github, and click the Pull Request button. Review your changes, and write a great and humble PR introduction where you explain your changes in detail.

Read more: https://github.blog/2015-01-21-how-to-write-the-perfect-pull-request/


Note that when updating your PR with new commits you should not squash them with your previous ones, as this will break references to previous commits made during reviews.