I have difficulty understanding/verifying the following line from Pro Git:
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 have only an origin/serverfix pointer that you can’t modify.
I tried the following for a repository.
git clone git://git.bugseng.com/ppl/ppl.git
cd ppl
I removed folder ppl/src/ from my local machine, and made a copy of pre-existing folder ppl/m4/ into ppl/m4 - Copy just so as to locally modify/edit this folder a bit.
Then, I ran git fetch origin just to (I thought) set myself up to be in the situation mentioned in the book's quote above. I (of course) do not have any write access to this online repository.
Now, I am easily able to do git add . and git commit without any errors. Output of git status is:
:~/ppl$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
all as expected. That is, I have been able to make a commit and edit the branch locally. I am unable to reconcile this with the quote from the book which states that I would not have local editable copies of them.