Skip to content

Commit

Permalink
Tweak pull_requests.md procedure a little bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
panchoh committed Feb 21, 2019
1 parent 5cb857f commit ba86c97
Showing 1 changed file with 28 additions and 16 deletions.
44 changes: 28 additions & 16 deletions docs/pull_requests.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,50 @@
# Why this guide

We follow a *work agreement* to provide a linear history, with at most one branch in parallel.
We have stablished a *work agreement* to provide a linear history, with at most one branch in parallel.

We also require all commits in master to pass the tests.

For that to happen this guide enable you get your pull request ready for merge into the **master branch**.
For that to happen this guide will enable you to get your pull request ready for merge into the **master branch**.

# How to make a Pull Request to QED

TL;DR: always rebase to master before attempting to merge into master.
```bash
TL;DR: Always rebase to master before attempting to merge into master.

```bash
# download repo
git clone [email protected]:bbva/qed.git

# enter project dir
cd qed

# create your fork
hub fork

# add main organization
git remote add -f bbva [email protected]:bbva/qed.git

# create branch
git checkout -b <my-cool-branch>
# create a to branch to hack on
git checkout -b my-cool-feature-branch

# ... do some groovy changes
git commit -am "msg"
git commit -am 'some explanatory although a bit cryptic msg ;-P'

# ensure your changes are in your github fork
git push my-user my-cool-feature-branch

# create PR
$ hub pull-request --base bbva:master
hub pull-request --base bbva:master

# wait for feedback (possibly master will advance in the meantime)
git commit ...
git commit ...
git commit ...
git push ...

# wait for feedback (surely master will advance)
# once it's approved and ready to merge, rebase to master and resolve all conflicts.
git fetch origin master
git rebase origin/master

# once it's approved and ready to merge rebase and resolve conflicts.
git rebase master
# push rebased branch to your fork (the PR will be updated automatically)
git push --force-with-lease my-user my-cool-feature-branch

# check again tests are ok, and then merge
hub merge https://github.com/bbva/pr/pull/13
# check again that tests are ok, and then merge (this step can only be performed by developers with write access to the repo)
hub merge https://github.com/bbva/pr/pull/42
```

0 comments on commit ba86c97

Please sign in to comment.