Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat does 'git remote add upstream' help achieve?
    primarykey
    data
    text
    <p>I was reading on: <a href="https://wiki.diasporafoundation.org/Git_workflow#Rebase_your_development_branch_on_the_latest_upstream" rel="noreferrer">https://wiki.diasporafoundation.org/Git_workflow#Rebase_your_development_branch_on_the_latest_upstream</a></p> <p>Here is an extract:</p> <blockquote> <p>Your Repository Up to Date</p> <p>In order to get the latest updates from the development trunk do a one-time setup to establish the main GitHub repo as a remote by entering:</p> <pre><code>$ git remote add upstream git://github.com/diaspora/diaspora.git </code></pre> <p>Rebase Your Development Branch on the Latest Upstream</p> <p>To keep your development branch up to date, rebase your changes on top of the current state of the upstream master. See the What’s git-rebase? section below to learn more about rebasing.</p> <p>If you’ve set up an upstream branch as detailed above, and a development branch called 100-retweet-bugfix, you’d update upstream, update your local master, and rebase your branch from it like so:</p> <pre><code>$ git fetch upstream $ git checkout master $ git rebase upstream/master $ git checkout 100-retweet-bugfix </code></pre> <p>[make sure all is committed as necessary in branch]</p> <pre><code>$ git rebase master </code></pre> </blockquote> <p>Why is adding a 'remote upstream' needed in this case? Coudn't I have just done:</p> <pre><code>$ git checkout master $ git pull origin master $ git checkout 100-retweet-bugfix </code></pre> <p>[make sure all is committed as necessary in branch]</p> <pre><code>$ git rebase master </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload