-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Update patches page #916
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
Update patches page #916
Changes from all commits
0d93689
5d92960
30e5869
77ffd39
7e586aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,29 @@ Set up your user information with your real name and a working email address: | |
If you are new to Git, we highly recommend you to read the excellent and | ||
free `ProGit`_ book. | ||
|
||
.. tip:: | ||
|
||
Windows users: when installing Git, the installer will ask what to do with | ||
line endings and suggests to replace all Lf by CRLF. This is the wrong | ||
setting if you wish to contribute to Symfony! Selecting the as-is method is | ||
your best choice, as git will convert your line feeds to the ones in the | ||
repository. If you have already installed Git, you can check the value of | ||
this setting by typing: | ||
|
||
.. code-block:: bash | ||
|
||
$ git config core.autocrlf | ||
|
||
This will return either "false", "input" or "true", "true" and "false" being | ||
the wrong values. Set it to another value by typing: | ||
|
||
.. code-block:: bash | ||
|
||
$ git config --global core.autocrlf input | ||
|
||
Replace --global by --local if you want to set it only for the active | ||
repository | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the recommended value is |
||
|
||
Get the Symfony2 source code: | ||
|
||
* Create a `GitHub`_ account and sign in; | ||
|
@@ -132,6 +155,11 @@ Create the topic branch with the following command: | |
|
||
$ git checkout -b BRANCH_NAME master | ||
|
||
.. tip:: | ||
|
||
Replace "master" by, for example, 2.0, if you wish to submit a patch to the | ||
2.0 branch. | ||
|
||
.. tip:: | ||
|
||
Use a descriptive name for your branch (`ticket_XXX` where `XXX` is the | ||
|
@@ -215,6 +243,35 @@ with master, don't merge; and force the push to the origin: | |
$ git rebase -f upstream/master | ||
$ git push -f origin BRANCH_NAME | ||
|
||
.. note:: | ||
|
||
when doing a push -f (or --force), always specify the branch name explicitly | ||
to avoid messing other branches in the repo (--force tells git that you | ||
really want to mess with things so do it carefully). | ||
|
||
Often, moderators will ask you to "squash" your commits. This means you will | ||
convert many commits to one commit. To do this, use the rebase command: | ||
|
||
.. code-block:: bash | ||
|
||
$ git rebase -i head~3 | ||
$ git push -f origin BRANCH_NAME | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you should add a note about the force push saying that you should always specify the branch name explicitly when doing so to avoid messing other branches in the repo ( |
||
|
||
The number 3 here must equal the amount of commits in your branch. After you | ||
type this command, an editor will popup showing a list of commits: | ||
|
||
.. code-block:: text | ||
|
||
pick 1a31be6 first commit | ||
pick 7fc64b4 second commit | ||
pick 7d33018 third commit | ||
|
||
To squash all commits into the first one, remove the word "pick" before the | ||
second and the last commits, and replace it by the word "squash" or just "s". | ||
When you save, git will start rebasing, and if succesful, will ask you to edit | ||
the commit message, which by default is a listing of the commit messages of all | ||
the commits. When you finish, execute the push command. | ||
|
||
.. note:: | ||
|
||
All patches you are going to submit must be released under the MIT | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it actually possible to put code blocks in tips?