I'd like to know to connect and sync a COPY (an archive, not a clone) of a git repo with its remote repo.
Background: I have a local and remote repository. I zip up my local repository using git archive and then copy it to a server:
$ git archive --format=tar HEAD | gzip > myarchive.tar.gz
Question: After unzipping the archive on the server, how do I connect and sync the server's copy with the remote repository again?
If I do this:
$ git init
$ git remote add origin git@github.com/myusername:reponame.git
$ git fetch origin
git status still reports everything as being untracked.
What should I be doing so that my unzipped folder is perfectly in sync with the remote repo, and so I can simply pull any future commits to the remote repo?
Many thanks, Tim