-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweak pull_requests.md procedure a little bit.
- Loading branch information
Showing
1 changed file
with
28 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |