0

Instead of cloning a repo on github, I simply downloaded it as a zip file.

I have made changes, but now need to pull the latest updates from the original repo.

Can I simply init the local code and go from there?

Suggestions appreciated (and next time I will do it the right way!)

Thanks

Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74
Kevin Dev
  • 221
  • 1
  • 3
  • 8

1 Answers1

1

You should write down the remote repository URL then issue the following commands:

git init
git remote add origin <REPO_URL>

Then check by git status if you did some changes, and in that case commit or stage them.

Finally, issue git pull, ore git pull --rebase if you committed something in the previous step.

Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74
  • Thanks Antonia. The REPO_URL is not mine and it would not be welcome to update. Is the above still valid? What are your suggestions for staying connected to the REPO_URL for pulling changes from this third party codebase, but managing my changes locally (or even in my own remote repo)? – Kevin Dev Sep 02 '21 at 18:01