For instance, the repo is:
$ git remote -v
origin http://aaa/XXX (fetch)
origin http://aaa/XXX (push)
$ git rev-list --count master
46
But for some reason, the repo is moved to somewhere else.
git remote set-url origin http://bbb/XXX
Then try again:
$ git remote -v
origin http://bbb/XXX(fetch)
origin http://bbb/XXX(push)
$ git rev-list --count master
46