Why does `git fetch . origin/master:master` leave staged changes?

I am wondering why the following leaves staged changes:

git reset --hard master~4 # reset in prupose of the next command 
# fetch from this repository... src: origin/master to destination: master
git fetch --update-head-ok . origin/master:master 
git status # -> Shows various staged files?

The branch master seems to be in sync with origin/master. But: now I have various staged files on master ?. Why is this behavior like that? I thought that git fetch . origin/master:master updates my local branch HEAD to the one in origin/master. Obviously it does more? But what exactly?.



from Recent Questions - Stack Overflow https://ift.tt/2KG4HAv
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)