Skip to content

Commit e745b2f

Browse files
committed
Added notes on merging pull requests based on Matthias's message in mailing list.
1 parent e3d6236 commit e745b2f

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

CODING

+33
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,39 @@ deserves your options to accelerate it should be (in order of priority):
629629
PR incorporated into the code base.
630630

631631

632+
2.7.1.1. Best practice for creating a pull request
633+
==================================================
634+
635+
* Always start a feature branch from current master.
636+
* If you are coding a feature branch, don't "merge" anything in other than
637+
master (see below).
638+
* Before you create a pull request do "git fetch origin" and "git rebase
639+
origin/master" (given origin is the remote for upstream and not your own
640+
remote, check your .git/config or do "git remote -v | grep github.com/qgis").
641+
* You may do a "git rebase" like in the last line repeatedly without doing any
642+
damage (as long as the only purpose of your branch is to get merged into
643+
master).
644+
* Attention: After a rebase you need to "git push -f" to your forked repo.
645+
CORE DEVS: DO NOT DO THIS ON THE QGIS PUBLIC REPOSITORY!
646+
647+
648+
2.7.1.2. For merging a pull request
649+
===================================
650+
651+
Option A
652+
653+
* click the merge button (Creates a non-fast-forward merge)
654+
655+
Option B
656+
657+
* Checkout the pull request (See https://gist.github.com/piscisaureus/3342247)
658+
* Test (Also required for option A, obviously)
659+
* checkout master, git merge pr/1234
660+
* Optional: git pull --rebase: Creates a fast-forward, no "merge commit" is
661+
made. Cleaner history, but it is harder to revert the merge.
662+
* git push
663+
664+
632665
2.7.2. Patch file naming
633666
========================
634667

doc/CODING.t2t

+30
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,36 @@ deserves your options to accelerate it should be (in order of priority):
602602
* Send a message to the project steering committee asking them to help see your
603603
PR incorporated into the code base.
604604

605+
==== Best practice for creating a pull request ====
606+
607+
* Always start a feature branch from current master.
608+
* If you are coding a feature branch, don't "merge" anything in other than
609+
master (see below).
610+
* Before you create a pull request do "git fetch origin" and "git rebase
611+
origin/master" (given origin is the remote for upstream and not your own
612+
remote, check your .git/config or do "git remote -v | grep github.com/qgis").
613+
* You may do a "git rebase" like in the last line repeatedly without doing any
614+
damage (as long as the only purpose of your branch is to get merged into
615+
master).
616+
* Attention: After a rebase you need to "git push -f" to your **forked repo**.
617+
**CORE DEVS**: DO NOT DO THIS ON THE QGIS PUBLIC REPOSITORY!
618+
619+
620+
==== For merging a pull request ====
621+
622+
Option A
623+
624+
* click the merge button (Creates a non-fast-forward merge)
625+
626+
Option B
627+
628+
* Checkout the pull request (See https://gist.github.com/piscisaureus/3342247)
629+
* Test (Also required for option A, obviously)
630+
* checkout master, ``git merge pr/1234``
631+
* Optional: ``git pull --rebase``: Creates a fast-forward, no "merge commit" is
632+
made. Cleaner history, but it is harder to revert the merge.
633+
* ``git push``
634+
605635

606636
=== Patch file naming ===
607637

0 commit comments

Comments
 (0)