Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Move the pushing changes and synching remotes sections.
  • Loading branch information
ezio-melotti committed Sep 7, 2017
commit cafd72bb645488088103e2dad101a0d713b26019
37 changes: 0 additions & 37 deletions committing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -318,43 +318,6 @@ Remotes Setup
-------------


.. _committing-push-changes:

Pushing changes
'''''''''''''''

You have two remotes configured (see previous section for setup). Publishing
your changes to any of them is as simple as specifying the name of the remote
upon your push. Assuming I am working on a local branch ``bug1234`` and I want to
push it to my private fork I do::

git push origin bug1234

Option ``-u|--set-upstream`` creates a remote-tracking branch that tracks what
have been pushed to ``origin``::

git push -u origin bug1234

That allows to avoid rebasing beyond already pushed commits.
``git status --branch`` and ``git branch --verbose`` remind that the branch(es)
have not pushed commits.


Synchronizing remotes
'''''''''''''''''''''

To synchronize your fork, from the official repository you need to execute following
commands::

git fetch upstream # fetch remote changes
git checkout master # checkout your current master branch
git merge upstream/master # merge remote changes into your local master branch
git push origin master # publish changes to your private fork

The above steps can be executed against any branch you wish to, just replace master
with an appropriate branch name.


Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the stuff in this chunk either got added to the bootcamp or it was already there

.. _committing-active-branches:

Active branches
Expand Down
15 changes: 15 additions & 0 deletions gitbootcamp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,21 @@ To re-apply the last stashed change::

$ git stash pop

.. _commit-changes:

Committing Changes
------------------

Add the files you want to commit::

$ git add <filename>

Commit the files::

$ git commit -m '<message>'


.. _push-changes:

Pushing Changes
---------------
Expand Down
11 changes: 6 additions & 5 deletions pullrequest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,22 @@ Here is a quick overview of how you can contribute to CPython on GitHub:

#. :ref:`Get started <setup>` and set up your system

#. Fork `CPython`_ on GitHub (using the Fork button in the upper-right on GitHub)
#. :ref:`Fork CPython <fork-cpython>` (using the Fork button in the
upper-right on GitHub)

#. :ref:`Clone your GitHub fork and add an "upstream" remote <clone-your-fork>`

#. :ref:`Build Python <compiling>` on your system

#. :ref:`Run tests <runtests>` after you have built Python

#. :ref:`Add an "upstream" Remote in Git <remote-configuration>` (using SSH,
or you can `use HTTPS`_)

#. :ref:`Create a Branch in Git <pullrequest-steps>` where you can work on
changes

#. :ref:`Run tests <runtests>` again

#. :ref:`Push commits <committing-push-changes>` to your GitHub repo
#. :ref:`Commit <commit-changes>` and :ref:`push <push-changes>`
changes to your GitHub fork

#. `Create Pull Request`_ on GitHub to merge a branch from your fork

Expand Down