From b11a1b26b5fb89ed0201a888cb90d60bce410823 Mon Sep 17 00:00:00 2001 From: Emmanuel Arias Date: Thu, 7 Feb 2019 12:17:02 -0300 Subject: [PATCH 1/2] Add alias for sync local and origin master branch with upstream --- gitbootcamp.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gitbootcamp.rst b/gitbootcamp.rst index 05addbb57..a2fde3779 100644 --- a/gitbootcamp.rst +++ b/gitbootcamp.rst @@ -247,6 +247,16 @@ Solution:: The ``--rebase`` option is only needed if you have local changes to the branch. +You can automate the syncing with Upstream master setting up the next alias:: + + $ git config --global alias.update '!sh -c "git checkout master && git pull origin master && git pull upstream master && git push origin master"' + +Now you can run:: + + $ git update + +and both local and Origin master branch will be sync with Upstream master branch. + Another scenario: - You created ``some-branch`` some time ago. From 69c50f335c9b2884fbe51874099d2b0779220ea4 Mon Sep 17 00:00:00 2001 From: Emmanuel Arias Date: Wed, 28 Aug 2019 00:08:41 -0300 Subject: [PATCH 2/2] Add @willingc comments to the PR --- gitbootcamp.rst | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/gitbootcamp.rst b/gitbootcamp.rst index a2fde3779..03225a8c5 100644 --- a/gitbootcamp.rst +++ b/gitbootcamp.rst @@ -8,6 +8,11 @@ Git Bootcamp and Cheat Sheet In this section, we'll go over some commonly used Git commands that are relevant to CPython's workflow. +.. note:: + Setting up git aliases for common tasks can be useful to you. You can + get more information about that in + `git documentation `_ + .. contents:: .. _fork-cpython: @@ -247,16 +252,6 @@ Solution:: The ``--rebase`` option is only needed if you have local changes to the branch. -You can automate the syncing with Upstream master setting up the next alias:: - - $ git config --global alias.update '!sh -c "git checkout master && git pull origin master && git pull upstream master && git push origin master"' - -Now you can run:: - - $ git update - -and both local and Origin master branch will be sync with Upstream master branch. - Another scenario: - You created ``some-branch`` some time ago.