I was reading the Git documentation on pull and I ended up getting confused:
So let's create a hypothetical sequence:
git branch
that shows only the master. git branch -a
shows my local branch (which is the master) and the other remote. I want to have branch develop locally. Then I git checkout -b develop origin/develop
. Here is my question. When we do git checkout -b develop origin/develop
are we pulling the remote develop arm or are we locally enabling a develop arm that was pulled at the time of the clone? Looking at this part of the git pull documentation , it seems to me that it is the second scenario, as this is the justification for git pull
before making a pull da origin
.
Update the remote-tracking branches for the repository you cloned from, then merge one of them into your current branch:
$ git pull
$ git pull origin
That is, it looks like git pull origin
, will pull from a local arm that is origin / develop but that is not the develop that is in the central repository.
So we have to make a git pull
to update all the local images with the remote content and then do the pull origin develop to update my develop local with the origin / develop that is local tbm.
This makes me confused because from within my branch develop git branch -vv
shows me:
So if my develop points to [origin / develop] I would not have to dodevelop bbfdft67 [origin / develop] ZF45: Modifications in the tables and chart in FAQs - Take 3,
git pull
(as documentation suggests) before doing git pull origin
, unless I wanted to update all local branches ("hidden" ). And if that were the case, if git pull updated everything, I would not have to git pull origin
from within my develop.
So, really, where are you pulling (or updating data) when I do git pull?