> Tnx for this reply, very usefull for me too.
> But can you explain how git will work, if i anyway modify origin/master
> , like
> checkout origin/master
> vim ....
> git checkout -a
Okay, so origin/master in your repo is a local branch to where the
remote's master branch was when you last looked. That's all. If you
modify it, you've mucked around with that local pointer, nothing
else. The next time you look at the remote repo (e.g. git remote
update) it'll get moved back to the right place.
Of course, the commands you said won't even change origin/master. You
check out that remote branch, which puts you in a "detatched HEAD"
state - your HEAD is not at a local branch. You make a commit (I
figure you meant "git commit -a"?), and HEAD moves - but not origin/
master, because git knows that's a dumb thing to do (as described
above). The only ways to get your origin/master remote branch to move
are to have it actually change on the remote, or to do something
really weird like use update-ref on it.
The simple answer: you can't really modify origin/master locally.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at