Skip to content

added a new document about how we are using Git #2337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions contributing/code/git.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Git
===

This document explains some conventions and specificities in the way we manage
the Symfony code with Git.

Pull Requests
-------------

Whenever a pull request is merged, all the information contained in the pull
request (including comments) are saved in the repository.

You can easily spot pull request merges as the commit message always follows
this pattern:

.. block: text

merged branch USER_NAME/BRANCH_NAME (PR #1111)

The PR reference allows you to have a look at the original pull request on
Github: https://github.com/symfony/symfony/pull/1111. But all the information
you can get on Github are also available from the repository itself.

The merge commit message contains the original message from the author of the
changes. Often, this can help understand what the changes were about and the
reasoning behind the changes.

Moreover, the full discussion that might have occurred back then is also
stored as a Git note (before March 22 2013, the discussion was part of the
main merge commit message). To get access to these notes, add this line to
your ``.git/config`` file:

.. block: text

fetch = +refs/notes/*:refs/notes/*

After a fetch, getting the Github discussion for a commit is then a matter of
adding ``--show-notes=github-comments`` to the ``git show`` command:

.. block: text

git show HEAD --show-notes=github-comments
1 change: 1 addition & 0 deletions contributing/code/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ Contributing Code
tests
standards
conventions
git
license