Skip to content

Commit f61db7e

Browse files
fabpotweaverryan
authored andcommitted
added a new document about how we are using Git
1 parent 0b7d8f4 commit f61db7e

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

contributing/code/git.rst

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Git
2+
===
3+
4+
This document explains some conventions and specificities in the way we manage
5+
the Symfony code with Git.
6+
7+
Pull Requests
8+
-------------
9+
10+
Whenever a pull request is merged, all the information contained in the pull
11+
request (including comments) are saved in the repository.
12+
13+
You can easily spot pull request merges as the commit message always follows
14+
this pattern:
15+
16+
.. block: text
17+
18+
merged branch USER_NAME/BRANCH_NAME (PR #1111)
19+
20+
The PR reference allows you to have a look at the original pull request on
21+
Github: https://github.com/symfony/symfony/pull/1111. But all the information
22+
you can get on Github are also available from the repository itself.
23+
24+
The merge commit message contains the original message from the author of the
25+
changes. Often, this can help understand what the changes were about and the
26+
reasoning behind the changes.
27+
28+
Moreover, the full discussion that might have occurred back then is also
29+
stored as a Git note (before March 22 2013, the discussion was part of the
30+
main merge commit message). To get access to these notes, add this line to
31+
your ``.git/config`` file:
32+
33+
.. block: text
34+
35+
fetch = +refs/notes/*:refs/notes/*
36+
37+
After a fetch, getting the Github discussion for a commit is then a matter of
38+
adding ``--show-notes=github-comments`` to the ``git show`` command:
39+
40+
.. block: text
41+
42+
git show HEAD --show-notes=github-comments

contributing/code/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ Contributing Code
1010
tests
1111
standards
1212
conventions
13+
git
1314
license

0 commit comments

Comments
 (0)