xxxxxxxxxx
# initialize new git repository in the working copy directory.
cd /path/to/my/project
git init
# add git remote repository and fetch it
git remote add origin url-to-your-remote
git fetch origin
# reset working copy to remote repository
git reset --hard origin/master