progit / progit2

Pro Git 2nd Edition
Other
5.85k stars 1.93k forks source link

3.5 Git Branching - Remote Branches - pronoun troubles?? #944

Open jonhale opened 6 years ago

jonhale commented 6 years ago

I read this section several times yesterday and got confused every time. Went to bed to see if a good sleep would make it right, but it didn't. Early in the Pushing section there is a paragraph about a serverfix local branch:

If you have a branch named serverfix that you want to work on with others, you can push it up the same way you pushed your first branch. Run git push :

$ git push origin serverfix Counting objects: 24, done.

Delta compression using up to 8 threads. Compressing objects: 100% (15/15), done. Writing objects: 100% (24/24), 1.91 KiB | 0 bytes/s, done. Total 24 (delta 2), reused 0 (delta 0) To https://github.com/schacon/simplegit

  • [new branch] serverfix -> serverfix

This I believe creates the branch origin/serverfix but "I" still have my local serverfix branch as well, right?

The next time one of your collaborators fetches from the server, they will get a reference to where the server’s version of serverfix is under the remote branch origin/serverfix:

Ok, so this new example is not "me" this is one of "my collaborators"...

$ git fetch origin remote: Counting objects: 7, done. remote: Compressing objects: 100% (2/2), done. remote: Total 3 (delta 0), reused 3 (delta 0) Unpacking objects: 100% (3/3), done. From https://github.com/schacon/simplegit

  • [new branch] serverfix -> origin/serverfix

And then here is where things start getting real squirrely for me (italics added my me):

It’s important to note that when you do a fetch that brings down new remote-tracking branches, you don’t automatically have local, editable copies of them. In other words, in this case, you don’t have a new serverfix branch — you only have an origin/serverfix pointer that you can’t modify.

To merge this work into your current working branch, you can run git merge origin/serverfix. If you want your own serverfix branch that you can work on, you can base it off your remote-tracking branch:

Don't "I" already have my own serverfix branch ? If not, where did it go and when did it leave me? I suspect that the text is talking about how my collaborator can get their own serverfix branch.

Please let me know if this confusion is just caused by my poor reading skills. Thank you very much for the extremely informative book. -jon

ben commented 6 years ago

No, you make a good point. We're assuming that the reader is now reading from the point of view of their colleague, which it sounds like isn't the best.

If you'd like, I'd love for you to submit a PR. Maybe invent a fictional colleague, and rewrite the pronouns and names to make it clear whose point of view is being described?