As the title, I want to link local repo to remote.
Description:
- I have a repo and remote are linked (as normal).
- I delete the git folder at local repo (I lost local repo).
- I try to reconnect them by using "git init" and "git remote add origin https://github.com/myrepo.git".
- The new local is looked like a new empty repo, every subdir or branches on my old repo now untracked (Figure 1).
Figure 1:
Question: What is the git command help me to make the new repo is 100% same the old in the description step 3.
Thank!