$ git remote set-url origin <remote_repo>
$ git checkout -- .
$ git reset --hard
$ git clone -b <branch> <remote_repo>
$ git checkout -
$ git rm --cached [dir|file|pattern] -r
$ git remote set-url origin <remote_repo>
$ git checkout -- .
$ git reset --hard
$ git clone -b <branch> <remote_repo>
$ git checkout -
$ git rm --cached [dir|file|pattern] -r