-1

I recently changed machine and I was working on a project on the other pc. The project was linked to a remote repo on GitHub and all was working fine.
Today I downloaded the zip file of that repo from GitHub and I ran "git init" to create a local repo.
My question is:

  • How can I make the remote repo "forget" about the other file and make the new one I downloaded on the new machine the "main" file?
  • Is there a better way (best practice) to handle your projects again once you change machine?

I'm sorry if my terminology and knowledge insulted Git's OGs, but I'm fairly new to version control!

Hugo y
  • 1,421
  • 10
  • 20
Zakaria
  • 421
  • 5
  • 13

1 Answers1

1

Downloading the zip file would not be the proper course of action here: simply clone the repository back to your new PC.

git clone https://github.com/<you>/<yourRepo>
cd <yourRepo>

From there, you can modify, add, commit and push back.

The Zip file you see here represents only the latest HEAD content (that feature dates back from the very beginning of GitHub: 2008), not the full repository history. Hence the need for git clone.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250